From: Brion Vibber (brion@pobox.com)
Date: Mon 01 Jun 1998 - 22:25:39 IDT
Hello everyone, I've updated the wheel mouse support (for MS IntelliMouse, Logitech MouseMan+, and friends) for svgalib 1.3.0, based on the 20 May source release. It has successfully been tested on a MS IntelliMouse and a Logitech FirstMouse+, both of the PS/2 variety. So far no serial mice have been tested. This vesion now allows for something functional to happen when the wheel is turned: fake keypresses are simulated, one scancode for turning up, another for turning down. It may only work with apps using raw keyboard support, I've so far only tested it with Quake and Quake2. ;) The scancodes sent are specified by the user in the config file, I have updated the sample config file to include directions and an example. In order to avoid requiring the user to look up keyboard scancodes for the keys to simulate, symbolic names are used; basically I took the constants from keyboard/vgakeyboard.h and removed SCANCODE_ from them. The code's a little ugly, and it would be better to allow either numerical scancodes, quoted characters ('A', "[", etc, where applicable), or the descriptive names (ENTER, PAGEDOWN, etc), and it will be majorly overhauled in the near future. Also this code could be used in the keyboard code for the fake mouse events, which require a keyboard scancode as well, currently implemented only as a numerical value. Note that the wheel-turning events are instantaneous, unlike a click.....release, so sustained simulated keypresses aren't possible. (If someone would like to prove me wrong with some creative coding, feel free!) Anyone with such a mouse is encouraged to test this patch; anyone without such a mouse is encouraged also to test it and make sure I didn't break anything else in the process. The patch can be obtained at http://pobox.com/~brion/linux/svgalib-1.3.0-wheel-0.2.patch.gz If there is any interest I will backport this patch to svgalib 1.2.13; I also have an earlier patch (no fake kbd events) available, see http://pobox.com/~brion/linux/svgalib-wheel-0.1.tar.gz Comments welcome... enjoy! -- brion vibber (brion@pobox.com)
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST