I have a hosted Ubuntu machine that runs KVM for virtualisation. I just created a new VM, and wanted to use virt-manager to get a graphical VNC connection to the machine.
So, I did the following on my macbook with Dvorak keyboard layout:
ssh -X kvm-host.mydomain.nl
sudo virt-manager -c qemu:///system
I double-clicked the new VM, and got the graphical screen with the login prompt. However, when I started typing my username, I quickly noticed that the letters that appeared in no way corresponded to the keyboard layout I use, Dvorak. It wasn’t even a Dvorak/Qwerty juxtaposition, but was utterly unusable. For example, the 8 key produced an Enter character.
Google helped me find a blog post which described the same issue. So I ran virsh edit my-vm-name and added keymap=’en-us’ to the <graphics> tag, restarted my vm, and restarted libvirt on the host. That improved things already – the 8 key produced an 8. But now I was stuck with Dvorak vs Qwerty problems.
Some more searching found me a blog post which contains a Dvorak keymap file for qemu. I put that in /usr/share/qemu/keymaps/en-dv and changed en-us to en-dv in the <graphics> tag.
I think it’s great that people write down problems like these and the solutions they found! Makes it much easier for others to solve similar problems. Hopefully, one day, someone will find this blog post and fix their problem because of it