[ltp] Changing sensitivity ThinkPad USB Keyboard with TrackPoint
Yves-Alexis Perez
linux-thinkpad@linux-thinkpad.org
Thu, 10 May 2012 07:52:01 +0200
--=-00sD6Xm77iNgpn/omBKQ
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On mer., 2012-05-09 at 18:04 -0700, Quesillo Quesedor wrote:
> Hello=20
>=20
> I have this python script for changing the sensitivity of the trackpoint.
>=20
> #pyusb imports
> import usb.core=20
> import usb.util
>=20
> data =3D [0x4, 0x6a, 0x3, 0xfc, 0x38]
> dev =3D usb.core.find(idVendor=3D0x17ef, idProduct=3D0x6009)
>=20
> dev.ctrl_transfer(0x21, 0x9, 0x304, 0x1, data)
>=20
>=20
> It needs root to be able to open the device and on linux you need to unbi=
nd the trackpoint device from usbhid module before you run the script and t=
hen bind it back.
> # echo XXX > /sys/bus/usb/drivers/usbhid/unbind
>=20
> # 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.
>=20
> data[3] is the value that changes the sensitivity level, I found that the=
windows driver use one of the following values
> 0x66 0x72 0x80 0x8f 0xa0 0xb3 0xc9 0xe1 0xfc
>=20
I'm a bit unsure about that, but would it make sense to do that with an
in-kernel interface or something like that?
--=20
Yves-Alexis
--=-00sD6Xm77iNgpn/omBKQ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABCAAGBQJPq1eBAAoJEDBVD3hx7wuow44P/iVakYwK1JvTX9v5SryBbei8
wRb1bHDxjqgEEP8lpNvvx8hgsOQLVlQKIl7tcCUvooAdVYSjqHyjT5sYXSwC8O/g
eu8BQDqyjqQP8VQo9UmG4jrPOPy1a2jjrEq9g1E4URcJjM7y/9ObMZdrvMwURPvm
0BcPF9zdIHWO3X2rW29cwMTRjMBrvuJFw9JoyXX/bPvvzJ17SZfEZUVFNib6y2Zy
B6EmVFwbtV8MNApYv99wJA5q7Raf6p5qANWMbVVAhHtv96Zma2jSfDxowtcqQJm4
ioLp2MEBXHBt6ER87HumplFclRdgUdvEUorcBB0KXcsYl8ObYuTUm1wWrUzhW0Jv
5Loii8AQNy2cmPqJuFEb3SmNY3lvI6LGUCAdIG+4TXgoQFvytKEUGkXLDKCSfBK8
nnfqUpLYeSbbnnHfgzKzPWNFlQRfNkvWrwb9XkImtlH0da4hpWYR/wgA0jmUb85y
Tg0tFZYKk/eVlmrF5ACzEpKx5f/bACF9TLczvkTLWg/+SvmJle96WXLuRYTy/rjK
ZMFThsQlVEjEWEKahH2atMl9/KaZKaUKKOGxddFKFANU0bqK7xkDwsAvRWPGxvn8
tzKp7xrk+nhYrP5vcw9GlZ50h25VxjVMto0CrnA1HN0Rt/oPEgntpZUtjZZgfyfL
e6Rexa9cVm+Nh527pXd3
=xFA0
-----END PGP SIGNATURE-----
--=-00sD6Xm77iNgpn/omBKQ--