feat: add Num Lock / Caps Lock toggle buttons in InfoBar - #1514
Open
nitishagar wants to merge 1 commit into
Open
feat: add Num Lock / Caps Lock toggle buttons in InfoBar#1514nitishagar wants to merge 1 commit into
nitishagar wants to merge 1 commit into
Conversation
Make the existing Num Lock and Caps Lock indicators in the InfoBar interactive. Clicking one sends the lock-key scancode (press+release) to the remote over the existing keypressReport path, and each button's active state reflects the remote LED state from keyboardLedState. The buttons send the raw scancode like the e2e keyboard harness does, independent of the virtual-keyboard widget's keymap layer. Fixes jetkvm#1464
nitishagar
marked this pull request as ready for review
July 2, 2026 08:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds interactive Num Lock and Caps Lock toggle buttons to the InfoBar. Previously the InfoBar only showed non-interactive lock-state indicators; there was no way to toggle the remote lock state from the UI.
Fixes #1464
Change
Buttons.keypressReportJSON-RPC path (the same backend handler the HID-RPC path reaches).keyboardLedState.caps_lock/.num_lock) — primary theme when on, light when off.The button sends the raw scancode (like the e2e keyboard harness), not through the virtual-keyboard widget's keymap layer, so it is unaffected by the separately-reported virtual-keyboard Caps Lock issue.
Scope
UI-only. No backend/HID/gadget changes and no new state plumbing (reuses
keyboardLedState).Testing
npm run lint— passes (0 errors).npm run build:device— passes (tsc + vite).ui/e2e/infobar-lock-toggles.spec.ts) that clicks each toggle and asserts the LED state flips via the existingwaitForLedStateharness. Runs whereJETKVM_URLis set; skips gracefully otherwise.