|
NAMEimwheel - a mouse wheel and stick interpreter for X WindowsSYNOPSISimwheel [ options ]DESCRIPTIONIMWheel is a universal mouse wheel and mouse stick translator for the X Windows System. Using either a special version of gpm and it's /dev/gpmwheel FIFO, or the support for a ZAxis on the mouse built into some servers, such as XFree86. Utilizing the input from gpm or X Windows, imwheel translates mouse wheel and mouse stick actions into keyboard events using the XTest extension to X. Use xdpyinfo for information on the supported extensions in your X server.COMMAND LINE OPTIONSAvailable command line options are as follows:
Index Interpreted As Button Number A button-spec of "67" may be useful to use actual buttons 6 and 7 as wheel up and down, and limit the grab to only those two buttons. A button-spec of "0" turns off any defined mapping, thus allowing for skips in the button-spec for something that doesn't exist on your mouse. A button-spec of "45006" may be for normal wheel up/down and a thumb button 1, but no horizontal wheel axis. The default button-spec is "456789". See also xmodmap(1).
gpm -v @Exclude commands in the rc file are unused in this mode.
X WINDOWS ZAXIS METHODThis method is the only method that works with multiple X displays, using multiple imwheels. Use multiple imwheels by either setting the DISPLAY environment variable before running each imwheel, or use the -X or --display 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 stick or wheel.Edit the XF86Config and add/edit the following lines in the "Pointer"(XFree86 3.3) or "InputDevice"(XFree86 4.x) section: 1 axis (vertical wheel): (XFree86 3.3) Buttons 5 ZAxisMapping 4 5 (XFree86 4.x) Option "Buttons" "5" Option "ZAxisMapping" "4 5" 2 axis (1 stick or 2 perpendicular wheels): (XFree86 3.3) Buttons 7 ZAxisMapping 4 5 6 7 (XFree86 4.x) Option "Buttons" "7" Option "ZAxisMapping" "4 5 6 7" The Buttons option may be greater than stated above if you have thumb buttons, or other extras that qualify as buttons. Make sure your Protocol is set to either "IMPS/2" for a PS/2 mouse or for serial mice set it to "IntelliMouse" or "Auto". This is for IntelliMouse compatible mice, other protocols may be required for other mice. Then while running X Windows run imwheel without the --wheel-fifo or -W options. NOTE
Also pid files are not used for this method. Thus the -p and --pid options have no effect, and are ignored. GPM/JAMD WHEEL FIFO METHODThis method is REQUIRED for any X Windows server without wheel mouse support built in. This method will currently support mice as supported through gpm or jamd.In the Pointer section of your XF86Config (or the equivalent configuration file for your X server) change your mouse Protocol to be "MouseSystems" (or the equivelant...), also change the Device file that the mouse is read from to "/dev/gpmdata", then restart X Windows if it is running. jamd will replicate to /dev/jam_ps2:0.0 or some other devices as well, make sure to use the right X Mouse protocol in this case, like the jamd_ps2 device is X mouse protocol PS/2, and the jamd_imps2 device is X mouse protocol IMPS/2. Before starting X Windows (re)start gpm with the -W option. Make sure you are using a supported wheel or stick mouse as stated in the gpm man page. After starting X Windows run imwheel as follows adding options as desired: for gpm you can use the following option to imwheel --wheel-fifo jamd requires you specify the fifo name as one of the /dev/jamd_imwheel:0.0 named fifos. Run ls -al /dev/jam_imwheel* to see what is available. In this example I would use -W /dev/jam_imwheel:0.0 as the option to imwheel. I usually add the -k option to kill off any old imwheel processes left over, as imwheel doesn't exit with the server, but rather it will only die if a wheel or stick action occurs when an X server is not connected, such as when X is dead or the DISPLAY environment variable is setup wrong, or the -X or --display variables connected imwheel to a now defunct X server. gpm or jamd, and/or imwheel can be restarted at any time, imwheel can sense when gpm of jamd is not there, and gpm nor jamd doesn't give a hoot about imwheel being up or not. NOTE
STICK SENSITIVITY SETTINGSThe -s and -t options specify a sensitivity and threshhold. each movement of a stick, or trackball, must equal or exceed the threshhold to be added to the respective axis sum. In other words if you puch the stick up hard enough to exceed the threshhold then the Y axis sum would be increased by however much you pressed up.Next the summed X and Y axis movement is each compared to the sensitivity setting. If the sensitivity setting is equalled or exceeded, then one imwheel event is spawned, thus after pressing up for a bit, the Y sum exceeds the sensitivity and a wheel up event is interpreted by imwheel into an action such as a PageUp key. The sensitivity therefore must be greater than the threshhold for it to have any bearing on the input. Pseudo code such as the following may explain: if(input >= threshhold) sum = sum + input if(sum >= sensitivity) { do an imwheel action sum = 0 } IMWHEELRCIMWheel uses, optionally, two configuration files. One called /usr/local/etc/imwheelrc, which is used for everybody. The other is $HOME/.imwheelrc, used only for one user. One is supplied and should have been installed automatically in /etc/X11/imwheel/ if not also in the installing users $HOME as well. All whitespace is ignored in the files except for within the window names' double quotes.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 it's configuration. The window names a priortized as first come first served, so more generic matches should always occur later in the configuration file. Comments are started with a pound (#) and extend to the end of the line. IMWHEELRC WINDOW SECTION HEADERSWindow name section headers are actually one of four things:Window Title Window Class Name Window Resource Name (null) which matches "\(null\)" in the imwheelrc Most of these are probe-able using fvwm2's FvwmIdent module or the
configurator (see the CONFIGURATION HELPER section). Other window
managers may have their own method of identifying windows' attributes.
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. IMWHEELRC TRANSLATION DEFINITIONSMouse wheel/stick 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:REQUIRED
OPTIONAL
IMWHEELRC COMMANDSCommands start with the `@' character. Commands are as follows:
Up is button 4 Down is button 5 Left is button 6 Right is button 7 Thumb1 is button 8 Thumb2 is button 9
CONFIGURATION HELPERIMWheel contains a semi-hidden configuration helper which can be brought up by rolling/sticking 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).Mouse wheel and stick actions can be grabbed along with active modifier keys on the keyboard. The mouse wheel/stick action is displayed and the X KeySyms are displayed beneath it. All this information can be directly entered into an imwheelrc as desired. 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 -R option to indicate to itself that this is a restarted imwheel. The -R is not for use by the user, as it bypasses some configuration of imwheel. KEYSYMSThe program expects combinations of keysyms to be used by using pipe(|) characters to combine them together.Example: Alt_R|Shift_RMeans right alt and 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. For FIFO users, it is possible to send a real mouse button event, using the special Button# syntax. An imwheelrc keysym of Button1 would send a real Mouse button 1 (left mouse button) event. Mouse4 is what you'd want for a MouseWheelUp type event. Mouse5 is what you want to MouseWheelDown event. Many applications will understand the meaning of mouse button 4 and 5, but most don't go beyond that. So Mouse6 and greater have no "standardized" meaning. The Button# syntax can be combined with regular keysyms, to send keys and mouse buttons at the same time. Example: Shift_L|Button4 - meaning left shift and wheel up. Button5 - meaning wheel down. Other button to imwheel meaniful references: KeySym IMWheel Input Real Mouse ------ ------------- ---------- Button1 (none) Left Mouse Button Button2 (none) Middle Mouse Button Button3 (none) Right Mouse Button Button4 Up Mouse Wheel Up Button5 Down Mouse Wheel Down Button6 Left Mouse Wheel Left Button7 Right Mouse Wheel Right Button8 Thumb1 Side Mouse Button 1 (left/up) Button9 Thumb2 Side Mouse Button 2 (right/down) Common Modifier Keysym names used in X: These are probably not currently assigned any keys, unless you xmodmap them in: Meta_L Meta_R (Actually, Sun keyboards have this...) Super_L Super_R Hyper_L Hyper_R And here's some that you may use, and they are somewhere on your keyboard:Here's where they were on my keyboard, again, this is not universal. Use the xev program to test your own keys on your keyboard! 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) The windows keys may not be assigned any KeySyms, but they will have numbers. xmodmap can be used to assign them to a real KeySym. To find keysym names for any keys available see the /usr/include/X11/keysymdef.h 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. Remember, there's always the configurator. And xev will also help here too! WHEEL OR STICK AS MIDDLE BUTTON IN XConfigure the XF86Config without "Emulate3Buttons" and increase "Buttons" if it is 2 in the Ponter or InputDevice section. The wheel or stick will act as a real middle button and the outer two buttons will act as separate buttons (1 and 3), even when pressed together.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 donn't forget to reduce the Buttons argument to 2! LEFTY BUTTON MAPPING IN X WINDOWSFor those of you lefties out there using method #1, the non-gpm method this command may help you get the buttons set up correctly in XWindows for both left handed and imwheel use.xmodmap -e "pointer = 3 2 1 4 5" or xmodmap -e "pointer = 3 2 1 4 5 6 7" etc... 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. add more numbers to the end of this line if you have more buttons! BUGSOf 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 on reducing strange behavior. This is still a beta, as indicated by the leading 0 in the version number.Real Bugs imwheel doesn't get along with itself on the same X display or using the same gpmwheel FIFO. - This will always be your fault :-/ 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. 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 is this? (Switch focus modes and/or window managers, or try the -f option on imwheel) 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. - This is my fault?! ;) HOMEPAGEhttp://jonatkins.org/imwheel AUTHORJonathan Atkins <jcatki@jonatkins.org>FILES$HOME/.imwheelrc The users configuration file. /usr/local/etc/imwheelrc The global location for the configuration file, it is always loaded. Overided by the users configuration file. /dev/gpmwheel The default wheel FIFO from gpm, if used. /dev/jam_imwheel:0.0 (or other numbers...) A wheel FIFO from jamd, if used, must be specified. jamd allows more than on FIFO, and thus allows more than one instance of imwheel to be running on the same computer when running imwheel on multiple displays using the Wheel FIFO method. /tmp/imwheel.pid The public area for imwheel's pid file. /var/run/imwheel.pid The private area for imwheel's pid file. SEE ALSOjamd(1) Jon Atkins Mouse - a replacement/augmentation for/to gpm. xwheel(1x) The new replacement for imwheel. Uses jamd instead of gpm or ZAxis. (may not be available yet) xdpyinfo(1x) X Display information, including extensions. gpm(8) General Purpose Mouse, imwheel edition required. FvwmIdent(1x) FVWM2's Identify module, for probing windows. regex(7) POSIX 1003.2 Regular Expressions. xmodmap(1x) Utility for modifying keymap & button mappings in X. xev(1x) Print contents of X events. /usr/include/X11/keysymdef.h X11 KeySym definitions. /usr/include/limits.h INT_MIN and INT_MAX definitions.
Visit the GSP FreeBSD Man Page Interface. |