Repository navigation
fix(system): use the US keymap in VMs - #165
Merged
Merged
Conversation
A VM is typed on through its hypervisor console. QEMU with -k en-us sends each character as its US QWERTY key, so a Dvorak guest remaps every key a second time and the disk-unlock prompt rejects the password. gliff and SSH carry the client's own layout. bootstrap now sets us/us with caps:none when systemd-detect-virt reports a VM and keeps Dvorak elsewhere. The unlock prompt follows at the next boot-image rebuild.
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A virtual machine is typed on through its hypervisor console. QEMU started with
-k en-us(Proxmox's default) sends each typed character as its US QWERTY key, so a guest set to Dvorak remaps every key a second time. On my remote Omarchy VM that made the disk-unlock prompt reject the right password.The guest's layout only matters on that console: gliff sends the client's own keymap and SSH sends characters.
What changes
modules/system/bootstrap.sh: whensystemd-detect-virt --vmreports a virtual machine, set the console keymap and X11 layout to plainus(stillcaps:none). Bare metal keeps Dvorak.modules/system/tests/test_keymap.sh: runs the shipped bootstrap against stubbedsudo,localectlandsystemd-detect-virtfor a VM and bare metal, each from both layouts, including that a converged machine gets nolocalectlcall.check:system-keymaptask, and a step in thesystem-sudoersCI job. It stays out oftest:*because bootstrap refuses root, which the Arch CI container runs as.docs/fork.mdand the README validation section.Not in this PR
localectlonly writes/etc/vconsole.conf. The disk-unlock prompt reads the copy inside the boot image, so it changes at the next image rebuild (a kernel update, or by hand). On a VM, Hyprland's own layout becomes US too, since Omarchy reads it from the same file.Verified
bash modules/system/tests/test_keymap.shpasses on Omarchy (bare metal).bash modules/system/tests/test_sudoers.shstill passes.