1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/console
catborise bfa0fc9fe5 feat(console): typed text follows the VM's keyboard layout
"Type it" sent each character's keysym and let QEMU pick the key from
its own US map, with Shift added for the US shifted characters. A VM
on another layout got other characters: on Turkish Q, '"' typed 'İ',
'@' typed "'", and ğ, ü, ş, ı, ö, ç typed nothing.

The Clipboard dialog now asks for the VM's keyboard layout and
remembers it per browser. Each character is typed as the key that makes
it on that layout (its scancode), with Shift, AltGr or both (AltGr
first: pressed after Shift, the right Alt is Alt on the Linux console),
so the VM's own layout makes the character. The layout is fixed when
typing starts. Text with a character no key types on the layout is not
typed at all, and the dialog lists those characters: a password or a
command with a character left out would be a wrong one.

A layout is one file in console/layouts/: its name and, for each key,
the characters it types plainly, with Shift, with AltGr and with
Shift+AltGr. The view offers every file, US first. dev/console_layout.py
writes a file from the system's XKB data as libxkbcommon computes it
(through ctypes, no new dependency), mapping keys to DOM codes with
noVNC's table from QEMU's keycodemapdb; it lists the dead keys it leaves
out, and drops the keys the keyboard model lacks (the key left of Z on
US pc104 keyboards). English (US) and Turkish Q come with it; the
README says how to add one.
2026-10-27 12:23:32 +03:00
..
layouts feat(console): typed text follows the VM's keyboard layout 2026-10-27 12:23:32 +03:00
migrations Add app 2015-02-27 14:25:41 +02:00
templates feat(console): typed text follows the VM's keyboard layout 2026-10-27 12:23:32 +03:00
tests feat(console): typed text follows the VM's keyboard layout 2026-10-27 12:23:32 +03:00
__init__.py Add app 2015-02-27 14:25:41 +02:00
models.py ci: replace super-linter with ruff 2026-10-04 01:08:11 +03:00
novncd fix(console): the console page judges a TCP/TLS console by the running VM 2026-10-26 23:52:37 +03:00
socketiod feat(console): the serial console page on the panel's bar; a taken-over user learns by whom 2026-10-27 08:12:33 +03:00
sshtunnels.py fix(console): an SSH console tunnel neither stalls on its errors nor hangs on close 2026-10-26 23:52:37 +03:00
tokens.py fix(console): a serial session follows its user's access; a superuser takes over 2026-10-26 19:46:41 +03:00
views.py feat(console): typed text follows the VM's keyboard layout 2026-10-27 12:23:32 +03:00