Environment
- macOS
- BongoCat Next 0.2.11
- Interactive keyboard model
Steps to reproduce
- Start BongoCat Next.
- Press Caps Lock once.
- Observe the paw assigned to Caps Lock.
Actual behavior
The paw remains in the pressed position until Caps Lock is pressed again.
Expected behavior
Caps Lock should behave like a tap: after the key is pressed, the paw should return to its default raised state.
Cause
On macOS, Caps Lock is delivered through FlagsChanged rather than a normal physical KeyUp. The current rdev event mapping turns the first toggle into KeyboardPress(CapsLock), while the frontend removes pressed keys only after receiving KeyboardRelease. The key therefore remains in the pressed set.
Proposed fix
In src-tauri/src/core/device.rs, allow one rdev event to produce multiple app events. On macOS only, when receiving KeyPress(Key::CapsLock), emit the normal KeyboardPress followed immediately by KeyboardRelease for CapsLock. Other keys and platforms remain unchanged.
I verified this locally with a regression test that asserts the Caps Lock press produces the paired press/release events, and by manually testing the development build.
Environment
Steps to reproduce
Actual behavior
The paw remains in the pressed position until Caps Lock is pressed again.
Expected behavior
Caps Lock should behave like a tap: after the key is pressed, the paw should return to its default raised state.
Cause
On macOS, Caps Lock is delivered through
FlagsChangedrather than a normal physicalKeyUp. The current rdev event mapping turns the first toggle intoKeyboardPress(CapsLock), while the frontend removes pressed keys only after receivingKeyboardRelease. The key therefore remains in the pressed set.Proposed fix
In
src-tauri/src/core/device.rs, allow one rdev event to produce multiple app events. On macOS only, when receivingKeyPress(Key::CapsLock), emit the normalKeyboardPressfollowed immediately byKeyboardReleaseforCapsLock. Other keys and platforms remain unchanged.I verified this locally with a regression test that asserts the Caps Lock press produces the paired press/release events, and by manually testing the development build.