mirror of https://gitee.com/openkylin/imwheel.git
444 lines
17 KiB
Groff
444 lines
17 KiB
Groff
.TH IMWheel 1 "January 28 2008" "Version 3.0.0"
|
|
.UC 1
|
|
.SH "NAME"
|
|
imwheel \- a mouse wheel and button interpreter for X Windows
|
|
.SH "SYNOPSIS"
|
|
\fBimwheel\fP [ \fIoptions\fP ]
|
|
.br
|
|
.SH "DESCRIPTION"
|
|
\fIIMWheel\fP is a universal mouse wheel and button translator for the X
|
|
Windows System. Utilizing the input from X Windows, imwheel translates mouse
|
|
wheel and mouse button actions into keyboard events using the XTest extension to
|
|
X. Use \fIxdpyinfo\fP for information on the supported extensions in your X
|
|
server.
|
|
.LP
|
|
.SH "COMMAND LINE OPTIONS"
|
|
Available command line options are as follows:
|
|
.TP
|
|
\fB-4, --flip-buttons\fP
|
|
Flips the mouse buttons so that 4 is 5 and 5 is 4, reversing
|
|
the Up and Down actions. This would make 4 buttons somewhat useful!
|
|
This is the similar to using '-b "5 4 6 7 8"'; see the \fB-b\fP option.
|
|
See also xmodmap(1).
|
|
.TP
|
|
\fB-b, --buttons\fP \fIbutton-spec\fP
|
|
Remap buttons in \fIbutton-spec\fP to interpreted wheel/button input.
|
|
Also limits the button grab to the specified buttons.
|
|
The \fIbutton-spec\fP must be surrounded by quotes.
|
|
Each button number must be separated by a space.
|
|
The \fIbutton-spec\fP is decoded in the following order for wheel input:
|
|
.RS
|
|
.RS
|
|
.nf
|
|
|
|
Index Interpreted As Button Number Name in imwheelrc
|
|
.br
|
|
1 Wheel Up 4 Up
|
|
.br
|
|
2 Wheel Down 5 Down
|
|
.br
|
|
3 Wheel Left 6 Left
|
|
.br
|
|
4 Wheel Right 7 Right
|
|
.br
|
|
5 Thumb Button 1 8 Thumb1
|
|
.br
|
|
6 Thumb Button 2 9 Thumb2
|
|
.br
|
|
7 Extra Button 1 10 ExtBt7
|
|
.br
|
|
8 Extra Button 2 11 ExtBt8
|
|
.br
|
|
etc.
|
|
|
|
.fi
|
|
.RE
|
|
A \fIbutton-spec\fP of "4 5" will limit the grabbed buttons to only wheel up and down.
|
|
.br
|
|
A \fIbutton-spec\fP of "0" turns off any defined mapping, thus allowing for skips in
|
|
the \fIbutton-spec\fP for something that doesn't exist on your mouse.
|
|
.br
|
|
A \fIbutton-spec\fP of "4 5 0 0 8" may be for normal wheel up/down and a thumb button 1, but
|
|
no horizontal wheel axis.
|
|
.br
|
|
The default \fIbutton-spec\fP is "4 5 6 7 8 9", but you may want or need to customize this
|
|
yourself. If you want to ignore the mouse wheel on regular mice, make sure to start the
|
|
\fIbutton-spec\fP with "0 0 0 0 ...", thereby skipping over the vertical and horizontal
|
|
axes of the wheel (whether or not the horizontal axis exists or is used).
|
|
.br
|
|
See also xmodmap(1).
|
|
.RE
|
|
.TP
|
|
\fB-c, --config\fP
|
|
Popup to configuration helper window imediately.
|
|
.br
|
|
See also \fBCONFIGURATION HELPER\fP
|
|
.TP
|
|
\fB-D, --debug\fP
|
|
Show all possible debug info while running. This spits out alot and I also
|
|
suggest using the \fB-d\fP option to prevent imwheel from detaching from the
|
|
controlling terminal.
|
|
.TP
|
|
\fB-d, --detach\fP
|
|
Actually this does the opposite of its name, it prevents detachment from the
|
|
controlling terminal (no daemon). Control-C stops, etc...
|
|
.TP
|
|
\fB-f, --focus\fP
|
|
Forces the X event subwindow to be used instead of the original hack that would
|
|
replace the subwindow in the X event with a probed focus query (XGetInputFocus).
|
|
This should fix some compatability problems with some window managers, such as
|
|
window maker, and perhaps enlightenment. If nothing seems to be working right,
|
|
try toggling this on or off...
|
|
.TP
|
|
\fB-g, --focus-events\fP
|
|
Disable the use of focus events for button grabs. If your \fB@Excluded\fP windows
|
|
are not regrabbing the mouse buttons when exited, try toggling this on or off...
|
|
.TP
|
|
\fB-h, --help\fP
|
|
Short help on options plus version/author info.
|
|
.TP
|
|
\fB-k, --kill\fP
|
|
Attempts to kill old imwheel.
|
|
Process IDs are tested using /proc/${pid}/status Name: field ?= imwheel.
|
|
If /proc is not mounted then this fails everytime!
|
|
Otherwise, this ensures that the wrong process is not killed.
|
|
.TP
|
|
\fB-q, --quit\fP
|
|
Quit imwheel before entering event loop.
|
|
.br
|
|
Example: `imwheel -k -q' = kill and quit (option order doesn't matter)
|
|
.TP
|
|
\fB-X, --display\fP \fIdisplay\fP
|
|
Use XServer at a specified \fIdisplay\fP in standard X form.
|
|
Using this option is usful for multiple displays.
|
|
.LP
|
|
.SH "X WINDOWS"
|
|
Use multiple imwheels by either setting the DISPLAY
|
|
environment variable before running each imwheel, or use the \fB-X\fP or
|
|
\fB--display\fP options to specify a different display for each imwheel.
|
|
Running multiple imwheels on the same display is not recommended, but is
|
|
allowed, and may cause strange things to happen while using the wheel or buttons.
|
|
.LP
|
|
Edit your xorg.conf, and ensure that in the "InputDevice" section, your mouse
|
|
Protocol is set to "ExplorerPS/2" for a modern PS/2 or USB mouse, or
|
|
if not then "IMPS/2". For serial mice set it to "IntelliMouse" or "Auto".
|
|
This is for IntelliMouse compatible mice; other protocols may be required for other mice.
|
|
.LP
|
|
.B NOTE
|
|
.br
|
|
The \fB@Exclude\fP command must be used for clients that either use the ZAxis
|
|
for themselves and have no keyboard translations to cause the same desired
|
|
effect. The \fB@Exclude\fP command must also be added for any client requiring
|
|
mouse and/or mouse button grabs and that don't specify specific buttons to
|
|
grab. These clients fail when they try to grab the mouse because the buttons 4
|
|
and 5 are already grabbed by imwheel. XV is an example of a client that
|
|
requires these types of grabs to succeed. KDE clients use the ZAxis for their
|
|
own purposes. The supplied imwheelrc includes an exclusion for XV already.
|
|
See the IMWheelRC section for more information.
|
|
.LP
|
|
.RE
|
|
.SH "IMWHEELRC"
|
|
IMWheel uses, optionally, two configuration files. One, /etc/X11/imwheel/imwheelrc,
|
|
is usable by everybody. The other is $HOME/.imwheelrc, used only by one
|
|
user. One is supplied and should have been installed automatically in /etc/X11/imwheel.
|
|
All whitespace is ignored in the files except for within the window names' double quotes.
|
|
.LP
|
|
The configuration file consists of window names and event translations and/or
|
|
imwheel commands that begin with an `@' (at) symbol. Each window name starts a
|
|
section that is its configuration. The window names are priortized as first
|
|
come first served, so more generic matches should always occur later in the
|
|
configuration file.
|
|
.LP
|
|
Comments are started with a pound (#) and extend to the end of the line.
|
|
.LP
|
|
.SH "IMWHEELRC WINDOW SECTION HEADERS"
|
|
Window name section headers are actually one of four things:
|
|
.LP
|
|
.nf
|
|
Window Title
|
|
Window Class Name
|
|
Window Resource Name
|
|
(null) which matches "\\(null\\)" in the imwheelrc
|
|
.fi
|
|
.LP
|
|
Most of these are probeable using fvwm2's FvwmIdent module or the configurator
|
|
(see the \fBCONFIGURATION HELPER\fP section). Other window managers may have their
|
|
own method of identifying windows' attributes.
|
|
.br
|
|
Each window name is matched as a regex string. Thus any window is matched using
|
|
the regex pattern ".*" as a window name. This pattern should be the last
|
|
section in your configuration file, or it will override the other window
|
|
configurations in the file for matched wheel/button actions.
|
|
.br
|
|
There is one special header noted as "(null)" which matches windows that have a
|
|
null string in the three attributes. This makes it possible to assign actions
|
|
to even Quake3, which has no info for its window. Just make sure that you
|
|
realize that the keys used should not be keys that may conflict with other
|
|
key actions in the game or application you are aiming to make work!
|
|
The included imwheelrc file has a "(null)" section included to demonstrate, and
|
|
it should work with Quake3.
|
|
.br
|
|
Each window/class/resource name \fImust\fP be enclosed in double quotes (") on a line by
|
|
itself.
|
|
.LP
|
|
Inside each window section is any number of translation definitions or commands.
|
|
Each translation definition or command must be on a line by itself.
|
|
The window section doesn't have to be terminated, as it is terminated by either starting
|
|
another window section or the end of the configuration file.
|
|
.LP
|
|
.SH "IMWHEELRC TRANSLATION DEFINITIONS"
|
|
Mouse wheel/button translations each take up a line after a window section has
|
|
been started. Each argument is seperated by commas(,); whitespace is ignored.
|
|
KeySyms are used to specify the keyboard input and outputs. Pipes (|) are used
|
|
to join multiple keys into one input/output.
|
|
The format is as follows...
|
|
.LP
|
|
.B REQUIRED
|
|
.br
|
|
The following arguments a required to make a minimum translation definition.
|
|
.TP
|
|
\fIKey Modifiers Input\fP
|
|
X KeySyms joined by pipes that indicate the required keys pressed when the
|
|
mouse action is made in order for this translation to be used. Alt, Meta,
|
|
Control, and Shift keys are typical modifiers, but are stated slightly different
|
|
than just `Shift' but rather `Shift_L' or `Shift_R', differentiating between
|
|
left and right shift keys. See the KeySyms section for more.
|
|
|
|
`\fBNone\fP' is a special KeySym used by imwheel, it is used to indicate no
|
|
modifiers. A blank entry is also acceptable in this case, but less descriptive
|
|
of what is going on! If `\fBNone\fP' is used then there can be no modifiers
|
|
in use during the wheel action. If the field is blank then \fIany\fP modifier
|
|
will match, so put these last in their window section.
|
|
.TP
|
|
\fIMouse Action Input\fP
|
|
This is the input from the mouse wheel or button. It is one of the following and
|
|
\fIonly\fP one:
|
|
|
|
.nf
|
|
Up
|
|
Down
|
|
Left
|
|
Right
|
|
Thumb
|
|
.fi
|
|
|
|
These are self explanatory. If you have trouble use the configurator!
|
|
.TP
|
|
\fIKey Action Output\fP
|
|
Out KeySyms are placed here. See KeySyms section for more on all available
|
|
KeySyms. Join KeySyms using pipes. Output keys are pressed in order and
|
|
released, in reverse order, only after all have been pressed, likely making
|
|
them all combined as in `Control_L|C' which would be a `^C' (control-c)
|
|
keypress.
|
|
.LP
|
|
.B OPTIONAL
|
|
.br
|
|
The following options are optional, but to use one you must fill in all the
|
|
preceding arguments.
|
|
.TP
|
|
\fIOutput Repetitions\fP
|
|
How many times should the Output KeySyms be pressed in a row.
|
|
|
|
Default is 1.
|
|
.TP
|
|
\fIDelay Before KeyUp Event\fP
|
|
How long in microseconds until we release all the Output KeySyms in one Output
|
|
Repetition.
|
|
|
|
Default is 0.
|
|
.TP
|
|
\fIDelay Before Next KeyPress Event\fP
|
|
How long in microseconds until we press the next the Output KeySyms.
|
|
Ths delay occurs after the Output KeySyms are released.
|
|
|
|
Default is 0.
|
|
.LP
|
|
.SH "IMWHEELRC COMMANDS"
|
|
Commands start with the `@' character. Commands are as follows:
|
|
.TP
|
|
\fB@Exclude\fP
|
|
Exclude this window from imwheel grabing mouse events. IMWheel will ungrab
|
|
the mouse when these windows are entered and not regrab the mouse until focus
|
|
is changed to a non-excluded window. This allows the ZAxis button events to
|
|
pass through normally and mouse grabs to succeed.
|
|
.TP
|
|
\fB@Priority\fP=\fIpriority\fP
|
|
Using this is allowed in each window/class/resource section.
|
|
Higher \fIpriority\fP values take precedence over lower ones.
|
|
Equal priorities on sections make the imwheelrc file parsed from top to bottom
|
|
to find the first match.
|
|
Thus \fB@Priority\fP can be used to make the file search for matches out of order,
|
|
then you dont have to keep the entries in order if you so please.
|
|
The supplied imwheelrc file contains extensive comments and examples of the
|
|
\fB@Priority\fP function.
|
|
.br
|
|
The default \fIpriority\fP for any new section is 0.
|
|
The last \fB@Priority\fP command in a section overrides all previous priorities
|
|
for that section. Thus each section has only one \fIpriority\fP setting in the end.
|
|
Priorities are kept as an int, thus range from INT_MAX to INT_MIN.
|
|
(See /usr/include/limits.h for these values on your system.)
|
|
.LP
|
|
.SH "CONFIGURATION HELPER"
|
|
IMWheel contains a semi-hidden configuration helper which can be brought up
|
|
by rolling up and down a few times in the root window of the X server.
|
|
Inside this window you can find out possible window names to use in your
|
|
imwheelrc file. Press on the mini-screen capture to grab another window,
|
|
including the root window (whole screen).
|
|
.LP
|
|
Mouse wheel and button actions can be grabbed along with
|
|
active modifier keys on the keyboard. The mouse wheel/button action is displayed
|
|
and the X KeySyms are displayed beneath it. All this information can be
|
|
directly entered into an imwheelrc as desired.
|
|
.LP
|
|
IMWheel can be restarted to read in a changed imwheelrc file or the
|
|
configurator can be canceled causing imwheel to resume oprations without
|
|
reading the configuration file. To restart, imwheel execs itself as called by
|
|
the user in the first place but adding the \fB-R\fP option to indicate to
|
|
itself that this is a restarted imwheel. The \fB-R\fP is not for use by the
|
|
user, as it bypasses some configuration of imwheel.
|
|
.LP
|
|
.SH "KEYSYMS"
|
|
The program expects combinations of keysyms to be used by using pipe(|)
|
|
characters to combine them together.
|
|
.LP
|
|
Example:
|
|
.RS
|
|
.nf
|
|
Alt_R|Shift_R
|
|
|
|
.fi
|
|
Means right alt \fIand\fP right shift together, not just either one or the
|
|
other! And not one after the other, they are both pressed at the same time
|
|
essentially.
|
|
.RE
|
|
.LP
|
|
Common Modifier Keysym names used in X:
|
|
.nf
|
|
Shift_L Shift_R
|
|
Control_L Control_R
|
|
Alt_L Alt_R
|
|
.fi
|
|
.LP
|
|
These are probably not currently assigned any keys, unless you \fIxmodmap\fP them in:
|
|
.LP
|
|
.nf
|
|
Meta_L Meta_R (Actually, Sun keyboards have this...)
|
|
Super_L Super_R
|
|
Hyper_L Hyper_R
|
|
.fi
|
|
.LP
|
|
And here's some that you may use, and they are \fIsomewhere\fP on your keyboard.
|
|
Here's where they were on my keyboard, again, this is not universal.
|
|
Use the \fIxev\fP program to test your own keys on your keyboard!
|
|
.LP
|
|
.nf
|
|
Caps_Lock = The Caps Lock key!
|
|
(This still turns on and off caps lock!)
|
|
Num_Lock = The Num Lock key!
|
|
(This is not good to use...
|
|
for the same reasons as Caps_Lock)
|
|
Multi_key = The Scroll Lock key!
|
|
(Go figure!)
|
|
Mode_switch = Right Alt...for me anyways.
|
|
(This mean I cannot use Alt_R)
|
|
.fi
|
|
|
|
The windows keys may not be assigned any KeySyms, but they will have numbers.
|
|
\fIxmodmap\fP can be used to assign them to a real KeySym.
|
|
.LP
|
|
To find keysym names for any keys available see the
|
|
\fB/usr/include/X11/keysymdef.h\fP file, and for any define in that file
|
|
remove the "XK_" for the usable KeySym name in the configuration file.
|
|
The path to this file may differ for you.
|
|
.LP
|
|
Remember, there's always the configurator.
|
|
And \fBxev\fP will also help here too!
|
|
.LP
|
|
.SH "WHEEL AS MIDDLE BUTTON IN X"
|
|
Configure the XF86Config without "Emulate3Buttons" and increase "Buttons" if it is 2
|
|
in the Ponter or InputDevice section. The wheel will act as a real
|
|
middle button and the outer two buttons will act as separate buttons (1 and 3),
|
|
even when pressed together.
|
|
.LP
|
|
Of course if your wheel keeps clicking middle button while you're trying to use the
|
|
wheel you may want to activate the Emulate3Buttons option to disable the wheel button!
|
|
And don't forget to reduce the Buttons argument to 2!
|
|
.LP
|
|
.SH "LEFTY BUTTON MAPPING IN X WINDOWS"
|
|
For those lefties out there, this command may help you get the buttons set up correctly in XWindows for both
|
|
left handed and imwheel use.
|
|
.LP
|
|
.RS
|
|
.nf
|
|
xmodmap -e "pointer = 3 2 1 4 5"
|
|
\fIor\fP
|
|
xmodmap -e "pointer = 3 2 1 4 5 6 7"
|
|
\fIetc...\fP
|
|
xmodmap -e "pointer = 3 2 1 4 5 6 7 8 9"
|
|
|
|
NOTE: most of these are NOT going to work, because of all the limits in X.
|
|
.fi
|
|
.RE
|
|
.LP
|
|
Add more numbers to the end of this line if you have more buttons!
|
|
.LP
|
|
.SH "BUGS"
|
|
Of course...but most of the time it's just that you haven't read everything I've written here and in the files of the distribution itself. Even then, you may be giving up too easily. Keep trying, it's not that hard. I am always working to reduce strange behavior. This is still a beta, as indicated by the leading 0 in the version number.
|
|
.LP
|
|
.B Real Bugs
|
|
.LP
|
|
imwheel doesn't get along with itself on the same X display. This will always be your fault :-/
|
|
.LP
|
|
Stick mice are still a pain in the butt to use. - This is the manufacturer's fault.
|
|
Or X Windows' fault, for not having a method to easily use such devices in all applications.
|
|
.LP
|
|
Keyboard focus isn't changed automatically to input keys into Window mouse is
|
|
over. This only occurs with Click-to-Focus type focus managment in window managers.
|
|
I use sloppy focus in fvwm2, which always works for me. - Whose fault \fIis\fP this?
|
|
(Switch focus modes and/or window managers, or try the \fB-f\fP option on imwheel)
|
|
.LP
|
|
Configuration file is not validated for correctness nicely... although it does
|
|
get preparsed before the main program starts, thus stopping you before you run
|
|
with an invalid configuration file. I just have never made a bad configuration
|
|
file, so I guess I'll have to try and do that to see what happens. Just don't
|
|
make any mistakes and you'll be fine.
|
|
.LP
|
|
.SH "HOMEPAGE"
|
|
.nf
|
|
http://imwheel.sourceforge.net
|
|
.fi
|
|
|
|
.LP
|
|
.SH "AUTHOR"
|
|
Jonathan Atkins <jcatki@jcatki.no-ip.org>
|
|
|
|
.LP
|
|
.SH "FILES"
|
|
.nf
|
|
$HOME/.imwheelrc
|
|
The user's configuration file.
|
|
|
|
/etc/X11/imwheel/imwheelrc
|
|
The global location for the configuration
|
|
file. Overidden by the user's configuration file.
|
|
.fi
|
|
|
|
.LP
|
|
.SH "SEE ALSO"
|
|
.nf
|
|
\fBxdpyinfo(1x)\fP
|
|
X Display information, including extensions.
|
|
\fBFvwmIdent(1x)\fP
|
|
FVWM2's Identify module, for probing windows.
|
|
\fBregex(7)\fP
|
|
POSIX 1003.2 Regular Expressions.
|
|
\fBxmodmap(1x)\fP
|
|
Utility for modifying keymap & button mappings in X.
|
|
\fBxev(1x)\fP
|
|
Print contents of X events.
|
|
\fB/usr/include/X11/keysymdef.h\fP
|
|
X11 KeySym definitions.
|
|
\fB/usr/include/limits.h\fP
|
|
INT_MIN and INT_MAX definitions.
|
|
.fi
|