Skip to content

webui: arrow keys and F1-F12 in the Extra keys drawer - #15

Open
y2kbugger wants to merge 2 commits into
BadCoder1337:mainfrom
y2kbugger:extra-keys
Open

y2kbugger wants to merge 2 commits into
BadCoder1337:mainfrom
y2kbugger:extra-keys

Conversation

@y2kbugger

@y2kbugger y2kbugger commented Sep 23, 2026 •

Copy link
Copy Markdown

BIOS setup and boot menus are driven by arrow and function keys, and the browser often takes those keys for itself: F1 opens help, F5 reloads, F11 goes full screen.

This adds a block to noVNC's own Extra keys drawer, always visible under the native keys and separated from them by a thin line:

  • Arrow keys, laid out as a keyboard's inverted T.
  • F1–F12, in a 3×4 grid.

The keys copy the native control-bar button: transparent, a faint white rim, white bold label, with the same hover and pressed states. Nothing folds out, so the drawer never changes size.

How it works:

  • A new injected module, assets/js/extrakeys.js, plus CSS in inject.css. Like the Power, Virtual Media and Keyboard extensions, it leaves the noVNC submodule untouched.
  • Keys go through noVNC's UI.sendKey with their physical key code. So the scancode pass-through in keyboard.js handles them like typed keys, and the drawer's held Ctrl/Alt toggles still combine with them (for example, Alt+F4).
  • No Go changes. The bridge already maps these keysyms (usbhid.go).

Tested in the browser against an AMI BIOS over KVM:

  • Down and Up moved the menu highlight.
  • F1 opened the General Help box, and the drawer's Esc closed it.
  • go vet ./... and go test ./internal/... pass.

This is independent of #14 and branches from main.

🤖 Generated with Claude Code

https://claude.ai/code/session_0112AFkyj3mqHvpvCeSzkazM

y2kbugger and others added 2 commits September 23, 2026 17:46
BIOS setup and boot menus are driven by arrows and function keys, which
the browser often takes for itself (F1 help, F5 reload, F11 full screen).
Adds four arrow buttons and an "F1" button to noVNC's own Extra keys
drawer; the latter unfolds a 3x4 grid of F1..F12 inside the drawer. Keys
go through UI.sendKey with their physical key code, so the scancode
pass-through handles them like typed keys, and the drawer's held Ctrl/Alt
toggles still combine with them (Alt+F4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112AFkyj3mqHvpvCeSzkazM
…grid

The fold-out F-key grid moved the drawer about and the white form buttons
did not match noVNC's look. Now the arrows (inverted T) and F1-F12 (3x4)
sit under the native keys, always visible, styled like the control-bar
buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112AFkyj3mqHvpvCeSzkazM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant