Skip to content

fix(caps-warning): caps warning is inverted when caps is active on page load (@fehmer, @Leonabcd123)#7478

Open
Leonabcd123 wants to merge 33 commits intomonkeytypegame:masterfrom
Leonabcd123:fix-caps-warning
Open

fix(caps-warning): caps warning is inverted when caps is active on page load (@fehmer, @Leonabcd123)#7478
Leonabcd123 wants to merge 33 commits intomonkeytypegame:masterfrom
Leonabcd123:fix-caps-warning

Conversation

@Leonabcd123
Copy link
Contributor

@Leonabcd123 Leonabcd123 commented Feb 6, 2026

Description

Update caps state on keydown rather than keyup

Fixes #7472

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Feb 6, 2026
@Leonabcd123 Leonabcd123 changed the title fix(caps-warning): caps warning is inverted when caps is active on page load (@Leonabcd123) fix(caps-warning): caps warning is inverted when caps is active on page load (@fehmer, @Leonabcd123) Feb 6, 2026
@VardanRattan
Copy link

This works, but it does reintroduce internal inversion for Linux CapsLock events.

Conceptually, the issue on Linux is timing (modifier state not settled at event time), not that getModifierState("CapsLock") is incorrect. A deferred read would avoid platform-specific inversion and keep CapsLock state fully derived from OS state.

Might be worth considering if we want to avoid encoding Linux timing assumptions into logic long-term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Caps Lock indicator becomes inverted when page is opened with Caps Lock already enabled

3 participants