Try this know that I upgraded my thinkpad keyboard from the usb one:
https://lore.kernel.org/linux-input/[email protected]/T/
This patch enables "native mode", in which middle button works properly (does not emulate press-release before scrolling) and horizontal scrolling is supported. It also handles trackpoint sensitivity and proper button mapping.
Originally posted by @ValdikSS in lentinj/tp-compact-keyboard#54 (comment)