Fix FN+middle: pass through as middle-drag instead of scroll

FN+middle was scrolling same as plain middle because the FN-alt path
always converted TrackPoint to wheel/pan. Now FN+middle jumps to
normal mouse passthrough (REL_X/REL_Y + BTN_MIDDLE), giving proper
middle-drag behavior. FN without middle still does back/forward + scroll.

Verified on real hardware via evtest on higgs (Pi 5).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 20:40:35 +02:00
parent 019e48a1cc
commit 5a1784cacd
+6 -4
View File
@@ -732,15 +732,17 @@ _mouse_write_ep2_suppress:
JMP _mouse_write_ep2_exit
_mouse_write_ep2_fn_alt:
; FN held: left/right -> back/forward, TrackPoint -> scroll (stock FN behavior)
; FN held: behavior depends on middle button
; FN+middle = normal mouse passthrough (middle-drag, no scroll)
; FN without middle = left/right -> back/forward, TrackPoint -> scroll
B0BTS0 tpData1.2
JMP _mouse_write_ep2_normal ; FN+middle -> plain middle-drag
; FN without middle: back/forward + scroll
MOV A, #0
B0BTS0 tpData1.0
OR A, #8 ; Button4 (back)
B0BTS0 tpData1.1
OR A, #16 ; Button5 (forward)
; FN+middle = pass middle click through (stock behavior)
B0BTS0 tpData1.2
OR A, #4 ; Button3 (middle)
B0MOV UDR0_W, A
INCMS UDP0
MOV A, #0 ; X-axis (suppressed)