Skip to content

Add optional keyboard-based text input - #2073

Open
Soroklon wants to merge 4 commits into
novnc:masterfrom
Soroklon:feature/clipboard-keyboard-input
Open

Add optional keyboard-based text input#2073
Soroklon wants to merge 4 commits into
novnc:masterfrom
Soroklon:feature/clipboard-keyboard-input

Conversation

@Soroklon

Copy link
Copy Markdown

Summary

Add an optional mode for sending text as RFB keyboard events instead of using the RFB clipboard.

The existing clipboard behavior remains the default. Users can select the keyboard input mode from the settings panel when clipboard integration is unavailable.

This also adds a reusable RFB.sendText() API with cancellation and configurable delay support.

Motivation

Some environments do not provide guest clipboard integration, even though RFB keyboard input is available. Examples include:

  • BIOS, bootloader, and installer environments
  • recovery consoles
  • minimal Linux systems
  • cloud and QEMU VM consoles without a clipboard agent

This feature is intended as an explicit fallback for those environments, not as a replacement for RFB clipboard support.

Behavior

  • RFB clipboard remains the default mode
  • Keyboard mode requires an explicit Send action
  • Text is sent using a US keyboard mapping
  • Printable ASCII, newline, and tab are supported
  • Unsupported input is rejected before any keys are sent
  • Text transmission can be cancelled
  • Concurrent transmissions are prevented
  • Automatic clipboard paste is disabled while keyboard mode is active

Testing

  • ESLint passes
  • 665 tests pass, with 4 existing tests skipped
  • Added tests for ASCII mapping, shifted characters, punctuation, newline, tab, cancellation, concurrent input, connection loss, and clipboard mode switching
  • Manually verified against an Ubuntu VM console

Related to #840 and #1957.

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