linux-surface
linux-surface copied to clipboard
Stylus right click button middle clicks
The surface pen 2 (one after sp4 without clip) middle clicks when the right click is pressed, rather than acting as a right click modifier like in windows 10.
Surface Pro 4.
Which OS are you using? I use Ubuntu 18.04 and had the same issue on a Surface Pro 6. This is OS related and can be solved as follows:
- list the ID of devices:
xinput list - check for the ID of the pen
- should look like this:
ipts 045E:001F Pen (0) id=18 [slave pointer (2)] - change the button order (here for an example with ID=18):
xinput set-button-map 18 1 3 2 - now test if right click works properly
- if right clicking works and you would like Ubuntu to start with these parameters:
- open /etc/X11/Xsession.d/91swapmousebuttons
- add the line
xinput set-button-map 18 1 3 2- save the file I hope this helps and sorry if the formatting looks strange. This is my first comment on github ;)
I thought I would comment because the suggestion from @PimPolacko helped me.
I am using Ubuntu 24.04 (x11) on a surface book 3. I have a "surface pen with no clip". Swapping buttons 2 and 3 fixed it for me.