No swedish keyboard layout

Jon Lachmann

Well-Known Member
Apr 27, 2011
31
0
46
I noted that there is no swedish keyboard layout available in proxmox, and this causes problem since the default username of windows in swedish is Administratör with an ö.

I am unable to type this in into the console, and therefore i cannot login. Is it possible to manually add a keyboard layout? If you have to add it into the build i would be glad to help test that it works.

Best regards
 
Nope, it doesnt change at all. When selecting the swedish keyboard layout in the virtual machine i can get an ä while pressing the ' key (next to ä). If i choose the english keymap in the virtual machine i can type chars like +'- and they are correct as per my swedish keyboard.
 
You need to stop the VM, then re-start the VM to activate those settings. Does that help?

It sure does help! Now i get åäö and am able to login... Although i am missing a few special chars like |<>'*^¨~´` but it is a great improvement.

Is it possible to add a swedish layout?

Thank you for your help!
 
What work is neccesary? I could do it if it isnt too complicated (i know some coding etc..).

I would first ask on the qemu developer list (http://wiki.qemu.org/MailingLists) if someone already has a patch (just be be sure).

Else you can start by modifying the danish layout in /usr/share/kvm/keymaps/da

AFAIK the format is not documented.
 
I have found that the keymap (at least in Oracle Linux and therefore probably also in RedHat / Fedora / CentOS) for Swedish keyboard layout is faulty. I documented my findings and a how-to that fixes this here, perhaps the solution also applies to Debian based distros? After the modifications all AltGr based keys work in VNC :)

Short description in English (note! from an RedHat/Oracle installation, path and filename might not be the same as for Debian):

Make copy of original keyboard mapping file, unzip it and open in an editor:

Code:
# cp /lib/kbd/keymaps/i386/qwerty/sv-latin1.map.gz sv-vnc.map.gz
# gzip -d sv-vnc.map.gz
# vi sv-vnc.map

add the following entries:

Code:
control altgr keycode 3 = at
control altgr keycode 4 = sterling
control altgr keycode 8 = braceleft
control altgr keycode 9 = bracketleft
control altgr keycode 10 = bracketright
control altgr keycode 11 = braceright
control altgr keycode 12 = backslash
control altgr keycode 27 = asciitilde
control altgr keycode 86 = bar

Save the file, compress it and start using:

Code:
# gzip sv-vnc.map
# cp sv-vnc.map.gz /lib/kbd/keymaps/i386/qwerty/
# loadkeys sv-vnc

Make sure keyboard mapping survives reboot by editing the following file so KEYTABLE= points to the new mapping file:

Code:
# vi /etc/sysconfig/keyboard

KEYTABLE="sv-vnc"

Thats it! :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!