Using a Thinkpad Yoga tablet/laptop

It’s more annoying than u would think

Basically give up on full tablet usage, even gnome with it’s tablet-first specification is fucking useless especially when it comes to the on screen keyboard which pops up to ruin your day and break applications and is nowhere to be seen when you want to type

But there are other things I’ve at least try to sort out of this cursed device

Middle button scrolling

Fuck this, this was the stupidest experience ever. It just works in gnome but not in xfce and I have no fucking idea how gnome made it work, so I came up with the worst way possible to fix it

xinput set-button-map "Synaptics TM2911-002" 1 0 3 4 5 6 7 8 9 10 11 12 && xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 0 && xinput test-xi2 --root "Synaptics TM2911-002" | grep --line-buffered "detail: 2" -B2 | grep --line-buffered "device: 14 (14)" -B1 | while read line; do if [[ $line == *"EVENT type 15"* ]]; then xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1; elif [[ $line == *"EVENT type 16"* ]]; then xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 0; fi; done

Oh fuck yes, this beautiful one liner. Don’t you dare ask for syntax highlighting, he is perfectly readable as he is.

The actual problem is that simple turning on Evdev Wheel Emulation and setting Evdev Wheel Emulation Button to 2, is that the button is actually on another device, the touchpad, separate from the trackpoint you actually want to do the scrolling with, so I can up with a stupid hack.

Simply change the button map so that button 2 is not mapped, disabling middle click pasting which is fucking annoying, set the emulation button to 0, which means it is unconditionally active regardless of pressed buttons, read inputs from the touchpad, filter by only the middle button, then enable and disable wheel emulation according to press state, and make sure this dirty little script is kept secret from all you love and hopefully you will never have to remember this is why your scroll is working.