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>
Middle-button scroll state machine (3-state: idle/undecided/scrolling)
with 150ms timeout — short press sends middle click, hold converts
TrackPoint movement to scroll wheel events. FN+middle passes through.
Also implements:
- CapsLock LED feedback via host LED output reports (P5.3/PWM0)
- FN+F7 (LGUI+P), FN+F9 (LGUI+I), FN+F11 (LCTRL+LALT+TAB)
- HID GET_REPORT with per-interface responses
- SET/CLEAR FEATURE for DEVICE_REMOTE_WAKEUP
Tested with 23/23 simulator tests passing (test_scroll.py).
Flash space: 10,238/10,239 words used (1 word free).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This indeed fixes the values read back:
80000000ff No buttons, no movement
80010000ff Left button
80050000ff Left+right buttons
80070000ff All buttons
800012fdff Force applied
80000fffff force applied
Adds support for:
- CLEAR/SET FEATURE (ignored)
- GET_CONFIGURATION (always returns 1 since there is only a single config)
- GET_INTERFACE (always returns 0 since there are not altsettings)
Matrix is getting scanned and converted into boot-style HID interface.
Most keys are basically working.
However the enabled debug UART prevents use of the following keys:
DELETE PRINTSCREEN INSERT PAGEUP PAGEDOWN
as S15 is in fixed output mode and thus can't be sensed right now.
Tested:
- UART debug output works at 115200 baud (pad S15)
- Jumps to bootloader on watchdog timeout
- Jumps to bootloader when Return is held while plugging in USB
- Jumps to bootloader when UTX/URX lines are shorted
- Measured max GPIO toggling speed is 3MHz