Introduce a new `ignore_keys` setting that allows users to prevent
specific keyboard inputs from being forwarded to the remote VNC host
while still allowing the browser/client to handle them locally.
This addresses common UX issues where browser-level shortcuts (e.g.
Escape to exit fullscreen or F11 for fullscreen toggle) are also sent
to the VM, potentially interrupting workflows or triggering unintended
actions.
Key behavior:
- Keys listed in `ignore_keys` are handled locally & not sent to the VM
- Default value is to not ignore any key events
- Supports comma-separated input with whitespace tolerance
- Accepts aliases (e.g. "esc", "ctrl", "cmd") mapped to canonical codes
- Matching is case-insensitive and normalized
Implementation details:
- Centralized supported keys via `supportedIgnoreKeys`
- Added `normalizeIgnoreKey()` to map aliases to canonical codes
- Introduced `wrapRfbSendKey()` to intercept and filter outgoing key
events
- Simplified `keyEvent()` to delegate to `rfb.sendKey`
- Added validation for user input with visual feedback on invalid
entries
- Added dynamic tooltip and placeholder generation from supported
key list
UI changes:
- Added `ignore_keys` input to settings panel
- Added tooltip with supported key examples
- Added inline validation styling for invalid entries
Tests:
- Added coverage for `shouldIgnoreKey()` including aliases,
normalization, whitespace handling, and edge cases
- Added tests for wrapped `sendKey` behavior to ensure filtering works
- Updated `keyEvent()` tests to reflect pass-through behavior
- Added validation and helper function tests
This change improves usability when interacting with fullscreen mode
and other browser-level shortcuts, while remaining backward compatible.