Package: tp2ctl
tp2ctlSimple python tool to allow configuration of theLenovo Trackpoint Keyboard II / Lenovo Trackpoint Keyboard 2on Linux. This tool specifically allows to set thepointer-speed(i.e.Trackpoint sensitivity) and to disable/enableThinkpad preferred scrolling-mode. Loosely based ontpkbdctl, this tool also uses thehidrawinterface to connect to the keyboard.Tested on Ubuntu 20.04 and ArchInstallationInstall via pip:pip install tp2ctlAlternatively, if you don't want to usepip, you can just clone the repo and run the scripttp2ctl.pyinsrc/tp2crl/directly (no external dependencies need to be installed....)Note:Python >= 3is required to run this toolUsageNote that access to/dev/hidraw*is required, you might have to run this tool as root...Set the trackpoint-sensitivity to maximum:sudo tp2ctl -s 8By default,tp2ctlwillauto-detectand use the firstLenovo Trackpoint IIKeyboard on the usb-bus. If you want to manually specify ahid-rawdevice, you can do so by using the-dswitch...
Please also note, that the settings are not permanent and have to be re-applied after the keyboard was disconnected.usage:tp2ctl.py[-h][-s[0-8]][-dDEVICE][--no-preferred-scrolling|--preferred-scrolling]ControlIBMTrackpoint2Keyboardfeatures

optionalarguments:-h,--helpshowthishelpmessageandexit-s[0-8],--pointer-speed[0-8]settrackpointsensitivity('Pointer Speed')-dDEVICE,--deviceDEVICEsethidrawdevicemanually--no-preferred-scrollingenable'Thinkpad Preferred Scrolling'--preferred-scrollingdisable'Thinkpad Preferred Scrolling'Automatically configure when plugging inTo automatically apply settings whenever you plug in, you can use an udev rule.Create a file at/etc/udev/rules.d/99-tp2ctl.rules:# The Lenovo TrackPoint Keyboard II needs to be configured via raw hid commands
# Read in bInterfaceNumber into a ID_USB_INTERFACE_NUM
SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"

# … so we can use it down here
SUBSYSTEM=="hidraw", ACTION=="add", ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="60ee", ENV{ID_USB_INTERFACE_NUM}=="01", RUN+="/usr/bin/tp2ctl -s 8 --preferred-scrolling -d /dev/%k"Tweak the path to the tp2ctl script, and the arguments accordingly, and make sure the script is owned and only writable byroot.Known LmitiationsOnly tested / working with 2.4GHz TransceiverThe internal Trackpoint of my Thinkpad seems to be much more sensitive as the one of theTrackpoint Keyboard II. However, this behaviour can also be observed usingWindows, so I blameLenovofor this ...When disablingThinkpad preferred scrollingthe mouse middle-button is not working any moreHorizontal scrolling does not workMiddle-Button pastes clipboard on scolling (very annoying)Windows Companion AppThe Windows Companion App has two main features:Set thePointer SpeedEnable/DisableThinkpad Preferred Scrolling(Thinkpad Preferred Scrollingenables vertical scrolling in Windows)ProtocolThe Windows Companion App sends USBSET_REPORTrequests to configure the keyboard. Specifically aSET_REPORT (Feature)with Feature-ID0x13and a payload of 8 + 1 bytes (first byte beeing the Feature-ID) is transmitted. The Windows App seems to send every setting-related package twice. The screenshot shows the tramssion of theDisable Preferred Scrollingpacket. You can find the.pcapfiles with the USB-Traces in the folderpcapsNote: Further information onSET_REPORT (Output)andSET_REPORT (Feature)requests can be found at theUSB HID Definition(Pages 29 & 52)PayloadsPointer SpeedSpeedData Fragment10x13 0x02 0x01 0x00 0x00 0x00 0x00 0x00 0x0020x13 0x02 0x02 0x00 0x00 0x00 0x00 0x00 0x0030x13 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x0040x13 0x02 0x04 0x00 0x00 0x00 0x00 0x00 0x0050x13 0x02 0x05 0x00 0x00 0x00 0x00 0x00 0x0060x13 0x02 0x06 0x00 0x00 0x00 0x00 0x00 0x0070x13 0x02 0x07 0x00 0x00 0x00 0x00 0x00 0x0080x13 0x02 0x08 0x00 0x00 0x00 0x00 0x00 0x0090x13 0x02 0x09 0x00 0x00 0x00 0x00 0x00 0x00Preferred ScrollingData FragmentEnable0x13 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00Disable0x13 0x09 0x01 0x00 0x00 0x00 0x00 0x00 0x00UnknownData FragmentReset to defaults (?)0x13 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00Initialize (?)0x13 0x01 0x0a 0x00 0x00 0x00 0x00 0x00 0x00ToDoImplement/Test bluetooth-supportFix pasting on middle-button click