Commit Graph

3 Commits

Author SHA1 Message Date
Walter Doekes 2fdbcd0566 keyboard: Fix ALT/OPT modifiers and key-release drops held modifier
When using the Keyboard BLE feature, pressing ALT-TAB to cycle through
windows was not possible. This is now fixed.

OPT-L (for screen lock) also works.

(Previously ALT and OPT/META keys never set _modifier_mask, so they were
sent as raw scan codes (0xe2/0xe3) in HID keycode slots instead of
setting the modifier byte. The USB sender now skips keycode for
modifier-only events.)

(On non-modifier key release, both BLE and USB senders sent an all-zero
HID report, dropping any held modifiers (e.g. ALT released on TAB-up).
Release now always sends getModifierMask() in the modifier byte so held
modifiers stay active -- enables ALT-TAB window cycling.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 11:14:46 +02:00
Walter Doekes 9ce215980c keyboard: Have Fn double as Shift key for the A-Z keys
The previous commit replaces Fn-as-shift with Aa-as-shift. But because
Aa and A are close to each other, that makes pressing Shift-A hard. As a
feature, Fn will do Shift for A-Z.

(No third symbol is printed on letter keys, so this feature made sense.)

The shift is injected via a new extraModifiers field in KeyEvent_t so the
HID modifier byte is set correctly over both BLE and USB, rather than
relying on the physical Aa (shift) key state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 11:14:41 +02:00
Forairaaaaa f0a0d5b787 init 2025-08-29 14:51:24 +08:00