[ltp] Re: Hacking the UltraNav USB keyboard

Richard Neill linux-thinkpad@linux-thinkpad.org
Tue, 22 Jan 2008 00:53:24 +0000


Volker Braun wrote:
> Good work! What about deactivating the touchpad completely? I opted for 
> the "hardware fix" on my USB Ultranav Keyboard (open up & disconnect), 
> but can the Windows driver do that non-permanently?
> 

Dear Volker,

Thanks for your reply. Yes, the Windows driver lets you do exactly what 
you want, via Control Panel -> Mouse.

In Linux, the way to do it is to set up 2 udev rules, for the different 
mouse devices, then set Xorg to use these devices explicitly, rather 
than the general purpose /dev/input/mouse. Here are mine.


cat /etc/udev/rules.d/10-local.rules
-----------------------------------------------
#Rules for the various different mice on the system (the PS/2, Synaptics 
and Trackpoint)

#First, identify the devices. cat /dev/input/mouseX and
#cat /dev/input/eventX while moving the devices

#Second, find a relevant udev rule. Pick one stanza only for
#identification. udevinfo -a -n /dev/input/mouseX

#Third, write the rule here. Remember use "==" to match attributes, and 
#"=" to define attributes.

#Fourth: run   udevcontrol reload_rules; udevtrigger to make it update,
#then test.  (if inotify is enabled, the udevcontrol reload_rules may be
#omitted)

#Fifth, use the symlink in xorg.conf
#See http://reactivated.net/writing_udev_rules.html for an excellent
#explanation of udev rules

#Be careful: the touchpad and trackpoint have very similar attributes

#PS/2 mouse (usually /dev/input/mouse1)
#Symlink as /dev/input/ps2mouse
KERNEL=="mouse*", DRIVERS=="psmouse", ATTRS{description}=="i8042 AUX 
port", NAME="input/%k", SYMLINK="input/ps2mouse"

#Trackpoint (usually /dev/input/mouse4)
#Symlink as /dev/input/trackpoint
KERNEL=="mouse*", SUBSYSTEM=="input", ATTRS{bInterfaceProtocol}=="02", 
ATTRS{bInterfaceSubClass}=="01", ATTRS{bInterfaceClass}=="03", 
ATTRS{bInterfaceNumber}=="01", NAME="input/%k", SYMLINK="input/trackpoint"

#Synaptics touchpad (in mouse mode) (usually /dev/input/mouse3)
#Symlink as /dev/input/synaptics-mouse
KERNEL=="mouse*", SUBSYSTEM=="input", ATTRS{interface}=="Rel", 
ATTRS{bInterfaceProtocol}=="02", ATTRS{bInterfaceSubClass}=="01", 
ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceNumber}=="00", 
NAME="input/%k", SYMLINK="input/synaptics-mouse"

#Synaptics touchpad (in event mode) (usually /dev/input/event8).
#This isn't really very useful.
#Symlink as /dev/input/synaptics-event
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{interface}=="Rel", 
ATTRS{bInterfaceProtocol}=="02", ATTRS{bInterfaceSubClass}=="01", 
ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceNumber}=="00", 
NAME="input/%k", SYMLINK="input/synaptics-event"

#Synaptics touchpad (in event mode, with the synaptics-usb driver)
#(usually /dev/input/event8).
#See http://www.jan-steinhoff.de/linux/synaptics-usb.html
#Symlink as /dev/input/synaptics-usb
KERNEL=="event*", SUBSYSTEM=="input", DRIVERS=="synaptics-usb", 
ATTRS{interface}=="Abs", ATTRS{bInterfaceProtocol}=="00", 
ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceClass}=="00", 
ATTRS{bInterfaceNumber}=="00", NAME="input/%k", 
SYMLINK="input/synaptics-usb"


-----------

Then use  /dev/input/trackpoint, etc in your xorg.conf, with one 
CorePointer, and the others as SendCoreEvents.

There are a lot of things to dislike about XP, but the Trackpoint driver 
isn't one of them.


HTH,

Richard