Blob


1 .TH MOUSESCROLLSIZE 3
2 .SH NAME
3 mousescrollsize \- compute mouse scroll increment
4 .SH SYNOPSIS
5 .B #include <draw.h>
6 .PP
7 int mousescrollsize(int maxlines)
8 .SH DESCRIPTION
9 .I Mousescrollsize
10 computes the number of lines of text that should be scrolled
11 in response to a mouse scroll wheel click.
12 .I Maxlines
13 is the number of lines visible in the text window.
14 .PP
15 The default scroll increment is one line.
16 This default can be overridden by setting the
17 .B $mousescrollsize
18 environment variable to an integer, which specifies
19 a constant number of lines, or to a real number
20 followed by a percent character, indicating that the
21 scroll increment should be a percentage of the total
22 number of lines in the window.
23 For example, setting
24 .B $mousescrollsize
25 to
26 .B 50%
27 causes a half-window scroll increment.
28 .PP
29 .I Mousescrollsize
30 is used by
31 .MR 9term (1)
32 and
33 .MR acme (1)
34 to set their scrolling behavior.
35 .SH SOURCE
36 .B \*9/src/libdraw/scroll.c
37 .SH SEE ALSO
38 .MR 9term (1) ,
39 .MR acme (1)
40 .SH BUGS
41 .I Libdraw
42 expects up and down scroll wheel events to be expressed as clicks of mouse buttons 4 and 5,
43 but the XFree86 default is to ignore the scroll wheel.
44 To enable the scroll wheel, change your
45 .B InputDevice
46 section of
47 .B XF86Config-4
48 to look like:
49 .IP
50 .EX
51 Section "InputDevice"
52 Identifier "Mouse0"
53 Driver "mouse"
54 Option "Device" "/dev/psaux"
56 # next four lines enable scroll wheel as buttons 4 and 5
57 Option "Buttons" "5"
58 Option "Emulate3Buttons" "off"
59 Option "Protocol" "ImPS/2"
60 Option "ZAxisMapping" "4 5"
61 EndSection
62 .EE