Try this know that I upgraded my thinkpad keyboard from the usb one:
https://lore.kernel.org/linux-input/20211017083246.977096-1-iam@valdikss.org.ru/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)