I am using a Surface Pro 7 with a Surface Pen. When I touch the pen on the screen, it sends a left-click event, as it should. When I hold the side button on the pen and touch the screen, it sends a left-click and middle-click event simultaneously. The expected behaviour is just a right click. If anyone can assist I would be very grateful.
I can add dmesg output if needed but seems like that is too general-purpose for this issue. However, here's the output of evtest that seems to reflect what is happening well:
evtest output
On a basic touch of screen with the pen:
```
...
Event: time 1714396244.082522, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 2409
Event: time 1714396244.082522, -------------- SYN_REPORT ------------
Event: time 1714396244.090461, type 3 (EV_ABS), code 0 (ABS_X), value 2397
Event: time 1714396244.090461, type 3 (EV_ABS), code 1 (ABS_Y), value 3757
Event: time 1714396244.090461, -------------- SYN_REPORT ------------
Event: time 1714396244.101631, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1714396244.101631, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1714396244.101631, -------------- SYN_REPORT ------------
Event: time 1714396244.125064, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1714396244.125064, -------------- SYN_REPORT ------------
```
With side button pressed:
```
...
Event: time 1714396248.702180, -------------- SYN_REPORT ------------
Event: time 1714396248.713254, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1714396248.713254, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1714396248.713254, -------------- SYN_REPORT ------------
Event: time 1714396248.723643, type 3 (EV_ABS), code 0 (ABS_X), value 1782
Event: time 1714396248.723643, type 3 (EV_ABS), code 1 (ABS_Y), value 2811
Event: time 1714396248.723643, -------------- SYN_REPORT ------------
Event: time 1714396248.737053, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0
Event: time 1714396248.737053, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 0
Event: time 1714396248.737053, -------------- SYN_REPORT ------------
```
I am using a Surface Pro 7 with a Surface Pen. When I touch the pen on the screen, it sends a left-click event, as it should. When I hold the side button on the pen and touch the screen, it sends a left-click and middle-click event simultaneously. The expected behaviour is just a right click. If anyone can assist I would be very grateful.
Environment
Linux MY_DEVICE_NAME 6.8.6-arch1-1-surface #1 SMP PREEMPT_DYNAMIC Tue, 16 Apr 2024 11:30:09 +0000 x86_64 GNU/Linux
I can add
dmesg
output if needed but seems like that is too general-purpose for this issue. However, here's the output ofevtest
that seems to reflect what is happening well:evtest output
On a basic touch of screen with the pen: ``` ... Event: time 1714396244.082522, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 2409 Event: time 1714396244.082522, -------------- SYN_REPORT ------------ Event: time 1714396244.090461, type 3 (EV_ABS), code 0 (ABS_X), value 2397 Event: time 1714396244.090461, type 3 (EV_ABS), code 1 (ABS_Y), value 3757 Event: time 1714396244.090461, -------------- SYN_REPORT ------------ Event: time 1714396244.101631, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 1714396244.101631, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0 Event: time 1714396244.101631, -------------- SYN_REPORT ------------ Event: time 1714396244.125064, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0 Event: time 1714396244.125064, -------------- SYN_REPORT ------------ ``` With side button pressed: ``` ... Event: time 1714396248.702180, -------------- SYN_REPORT ------------ Event: time 1714396248.713254, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 1714396248.713254, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0 Event: time 1714396248.713254, -------------- SYN_REPORT ------------ Event: time 1714396248.723643, type 3 (EV_ABS), code 0 (ABS_X), value 1782 Event: time 1714396248.723643, type 3 (EV_ABS), code 1 (ABS_Y), value 2811 Event: time 1714396248.723643, -------------- SYN_REPORT ------------ Event: time 1714396248.737053, type 1 (EV_KEY), code 320 (BTN_TOOL_PEN), value 0 Event: time 1714396248.737053, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 0 Event: time 1714396248.737053, -------------- SYN_REPORT ------------ ```