Skip to content

Add native virtual keyboard typing for touch-first browsers - #364

Merged
highbyte merged 1 commit into
masterfrom
feature/native-virtual-keyboard
Oct 1, 2026
Merged

highbyte merged 1 commit into
masterfrom
feature/native-virtual-keyboard

Conversation

@highbyte

@highbyte highbyte commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Touch-first browser users can now open their device keyboard from the emulator sidebar and type into C64, VIC-20, Oric, or Apple II. Committed text becomes timed presses and releases at the emulated keyboard matrix or encoder, so input also reaches programs that read the hardware directly.

The Keyboard button is hidden in native desktop apps and mouse-first browsers, where physical and accessibility keyboards already use the existing input path. Browser availability follows the primary pointer capability and updates when it changes. Focus loss, Pause, Stop, and monitor opening cancel queued text; the browser bridge handles composition, paste, Return, and Backspace without duplicate input.

Browser frame processing also yields to the browser event loop after each frame, preventing an overrun loop from starving input and painting. A regression test reproduces the starvation before the fix.

Known limitation

The native keyboard is intended for typing. Each character is held for three emulator frames, followed by a two-frame release gap. It cannot reliably provide continuous holds or simultaneous controls for games, including WASD keyboard joystick movement. Dedicated touch controls and machine-specific Avalonia keyboard layouts remain separate future work.

Validation

  • Browser and Desktop Debug builds passed with no warnings or errors.
  • Systems suite: 1,548 passed, 18 skipped; keyboard lifecycle, machine input, and browser scheduling regressions passed.
  • All 14 browser JavaScript tests passed; native keyboard script has 100% line, branch, and function coverage.
  • Independent build/test CI and Sonar branch analysis passed; no open Major-or-higher Sonar issues.
  • Beta publish completed successfully. User verified native keyboard typing in C64 BASIC on iPhone Brave and ordinary macOS accessibility keyboard input.
  • Agent live UI verification was blocked by browser site permissions and desktop automation permissions; other machines have automated input coverage but have not been manually verified on an iPhone.

Translate committed native keyboard text into timed hardware key presses for C64, VIC-20, Oric, and Apple II. Show the keyboard input panel only in touch-first browsers, and yield browser frame processing to keep input and rendering responsive.
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@highbyte
highbyte merged commit dd3155f into master Oct 1, 2026
14 checks passed
@highbyte
highbyte deleted the feature/native-virtual-keyboard branch October 1, 2026 21:32

This branch was successfully deployed

1 active deployment
github-pages — d7e12546 Deployed Oct 1, 2026 by highbyte via deploy #37
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