Re: Changing sensitivity ThinkPad USB Keyboard with TrackPoint
Richard Neill <rn214 <at> richardneill.org>
2012-05-10 21:59:43 GMT
On 10/05/12 02:04, Quesillo Quesedor wrote:
> I have this python script for changing the sensitivity of the trackpoint.
Thanks - that's really useful. I've been looking for something like this
for ages! Let me check: this is the external USB Ultranav keyboard, not
the internal one.
I'm having some trouble with this:
1. When I run
echo XXX > /sys/bus/usb/drivers/usbhid/unbind
I get: bash: echo: write error: No such device.
(this happens even as root, though the file in /sys does exist).
Btw, I have more than one USB HID device attached - how do we know which
one is being unbound?
2. My VID/HID aren't as below. Running lsusb, I get two possibilities:
Bus 002 Device 008: ID 04b3:3018 IBM Corp. UltraNav Keyboard
Bus 002 Device 009: ID 06cb:0009 Synaptics, Inc. Composite TouchPad and
Trying with either of these causes a python usb.core.USBError:
Input/output error, but this might be because of the failure to unbind
the USB hid device.
I think there are 2 different models of Ultranav USB keyboard.
Thanks for your help,
P.S. Also, can I suggest this would be really useful as an addition to
> #pyusb imports
> import usb.core
> import usb.util
> data = [0x4, 0x6a, 0x3, 0xfc, 0x38]
> dev = usb.core.find(idVendor=0x17ef, idProduct=0x6009)
> dev.ctrl_transfer(0x21, 0x9, 0x304, 0x1, data)
> It needs root to be able to open the device and on linux you need to unbind the trackpoint device from usbhid
module before you run the script and then bind it back.
> # echo XXX > /sys/bus/usb/drivers/usbhid/unbind
> # python2 trackpoint-script.py
> # echo XXX > /sys/bus/usb/drivers/usbhid/bind
> I did try to use Device.attach_kernel_driver but it doesn't seems to work for the trackpoint interface.
> data is the value that changes the sensitivity level, I found that the windows driver use one of the
> 0x66 0x72 0x80 0x8f 0xa0 0xb3 0xc9 0xe1 0xfc
> This script also works on OS X.
The linux-thinkpad mailing list home page is at: