From 06032400258f9b12c9fe64d4e9fd0de0ca34ee65 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 15 Jul 2026 11:19:47 -0500 Subject: [PATCH] fix: restore and improve the console virtual keyboard The Alpine.js frontend migration broke the on-screen keyboard on the standalone console page: - x-show could not reveal #virtual-keyboard because a stylesheet `display:none` ID rule overrode x-show's inline style. Use x-cloak for the pre-init hidden state instead. - Alpine, loaded in , auto-starts (queueMicrotask) and walks the DOM before the inline module registered the consoleToolbar component, so x-data resolved to an empty scope (toggleVirtualKeyboard "is not defined"). Load Alpine after the module, and import noVNC dynamically so the module's synchronous registration isn't blocked on the CDN fetch. - The keyboard was position:fixed and overlaid the terminal on mobile. Make it an in-flow flex child and size the container with 100dvh so it shrinks #vnc-screen (noVNC re-scales) instead of covering it, and every row stays within the visible viewport. Also add a SYM/ABC layer toggle exposing F1-F12 and special symbols (`~!@#$%^&*()_+={}[]\|:;"'<>?) sent via direct keysyms, so no Shift or physical-layout mapping is required. --- templates/vm_console.html | 142 +++++++++++++++++++++++++++++++++----- 1 file changed, 126 insertions(+), 16 deletions(-) diff --git a/templates/vm_console.html b/templates/vm_console.html index 89946a5..be74ded 100644 --- a/templates/vm_console.html +++ b/templates/vm_console.html @@ -10,7 +10,11 @@ - +