VNC keyboard issue. Dot key is not working :(

L

langloispy

Guest
Hi,

I have a problem when I use VNC to connect a VM. I some keys don't work, like .@\/

It's a problem when I need to enter a static IP during the installation process of the VM.
Otherwise, when the install process uses DHCP, I connect later through SSH or RDP without any problem and then configure the static IP if needed.

How can I fix that issue? I have tried to connect with the java vnc client from Ubuntu and from Windows or using an external VNC client (vinagre), all setup reproduce the problem...

dkn0248-pve:~# pveversion -v
pve-manager: 1.6-2 (pve-manager/1.6/5087)
running kernel: 2.6.18-3-pve
proxmox-ve-2.6.18: 1.6-6
pve-kernel-2.6.18-2-pve: 2.6.18-5
pve-kernel-2.6.18-3-pve: 2.6.18-6
qemu-server: 1.1-18
pve-firmware: 1.0-8
libpve-storage-perl: 1.0-14
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-7
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm-2.6.18: 0.9.1-6

dkn0248-pve:~# locale
LANG=fr_CA.UTF-8
LC_CTYPE="fr_CA.UTF-8"
LC_NUMERIC="fr_CA.UTF-8"
LC_TIME="fr_CA.UTF-8"
LC_COLLATE="fr_CA.UTF-8"
LC_MONETARY="fr_CA.UTF-8"
LC_MESSAGES="fr_CA.UTF-8"
LC_PAPER="fr_CA.UTF-8"
LC_NAME="fr_CA.UTF-8"
LC_ADDRESS="fr_CA.UTF-8"
LC_TELEPHONE="fr_CA.UTF-8"
LC_MEASUREMENT="fr_CA.UTF-8"
LC_IDENTIFICATION="fr_CA.UTF-8"
LC_ALL=

dkn0248-pve:~# cat /etc/pve/qemu-server.cfg
keyboard: fr-ca

Thanks!
 
  • Like
Reactions: kookix
I will try to reproduce it.

what kind of VM - KVM or container? and what OS do you install?
 
  • Like
Reactions: kookix
EDIT: The problem occurs only with KVM guest and on any OS. (Ubuntu, Windows, OSSIM,...) It works fine with openVZ
 
Last edited by a moderator:
which kind of keyboard layout do you use on your desktop? just to make sure that I got the same here.
 
on an fr machine it sometimes happens that in vnc console mode the . key is in fact on the : key ... ;)
donno why...but it happens ;)
 
Sorry I mislead you in my previous post... It works with OpenVZ container but doesn't with KVM. The keyboard layout in OpenVZ containers seems to be US and the command locale shows "POSIX". I can issue any character I need if they exists in the US layout which is OK.

So the problem occurs only with KVM.

My layout is fr-ca... I'm using Ubuntu 10.04 but I also tried it from a Windows XP/7 station with the same result. From the windows station, I changed the keyboard layout to US-English without better result...

langloipy@ubuntu1004amd64:~$ locale
LANG=fr_CA.utf8
LC_CTYPE="fr_CA.utf8"
LC_NUMERIC="fr_CA.utf8"
LC_TIME="fr_CA.utf8"
LC_COLLATE="fr_CA.utf8"
LC_MONETARY="fr_CA.utf8"
LC_MESSAGES="fr_CA.utf8"
LC_PAPER="fr_CA.utf8"
LC_NAME="fr_CA.utf8"
LC_ADDRESS="fr_CA.utf8"
LC_TELEPHONE="fr_CA.utf8"
LC_MEASUREMENT="fr_CA.utf8"
LC_IDENTIFICATION="fr_CA.utf8"
LC_ALL=

I can reproduce that bug with the following KVM (using the java vnc console or vinagre):
- Ubuntu 8.04
- Ubuntu 10.04
- the OSSIM iso installer (http://data.alienvault.com/alienvault_ossim_32bits_2.3.1.iso)
 
I tried the ":" but nothing happen. So I can't issue a : either :) The funny thing is that I can issue a "é" when the KVM locale is fr-ca but characters like .:\ etc don't work.
 
Hi... I still have some problem with the keyboard layout with the VNC java console... I made a few more test hoping that it could help debugging...

My test goes in 2 phases:
1: I have installed a VM with KVM, using the host kb layout set to en-us (Web interface/Configuration/System/Option: Keyboard Layout)
2: same thing as phase 1 but set the host kb layout to fr-ca...

In phase 1, I can issue a dot in the console. In phase 2, the dot does not work..

Once the VM is created and installed, if I change the host kb layout (Web interface/Configuration/System/Option: Keyboard Layout) to whatever, it does not have any effect* on the VM. So it is important to set the layout to en-us before the creation/installation of the VM if you want to be able to issue a "dot" or in the opposite to fr-ca if you want to reproduce the bug.

So since the fr-ca layout is not really useful when I install a VM, I will use en-us as a workaround for now...

Here is a detail configuration of the client, the host and the vm:

Phase 1: (dot key is working)
host:en-us http://pastebin.com/j2R4GK9n
client:fr-ca http://pastebin.com/PASYM1js
vm:fr-ca http://pastebin.com/KfYW7vC4

Phase 2: (dot key not working)
host:fr-ca http://pastebin.com/VHAbMumC
client:fr-ca same as phase 1
vm:fr-ca same as phase 1
 
If keyboards any keys not working than the problem is in your OS. In means it depends on that which Operating system you installed. As well as same as it is depends on the kind of VM - KVM or containers.
 
Is it possible to configure the qemu server to use raw keycodes like mentioned here: http://www.mail-archive.com/libvir-list@redhat.com/msg13340.html ?

Our recommendation is to never set the '-k' /keymap option at all these
days. Recent QEMU / KVM and GTK-VNC releases support a VNC extension for
sending raw keycodes, instead of localized keysyms. Thus is best to leave
off the keymap in the config, and just configure it inside the guest OS.

My host, qemu and the kvm client all use fr-ca layout but some keys does not work through VNC. If it is possible to remove the qemu stack from the problem it could be easier to debug. I really need the dot key!
 
Once the VM is created and installed, if I change the host kb layout (Web interface/Configuration/System/Option: Keyboard Layout) to whatever, it does not have any effect* on the VM.

You need to stop the VM, the start it again to activate those changes.
 
That does not work, because there is no known way to get raw keycodes with Java. People reported that problem years ago, but the java maintainers are not interested to solve such problems.

Ok... So is there a way I could debug the qemu key translation in order to get my keyboard to work? Where are located keymap files for qemu?

Thanks!
 
Youpi! Almost working! :)

I use the keymap from rdestop which contains more entries compare to the keymap of KVM (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513845). When I add these entries to /usr/share/kvm/keymaps/fr-ca, I can issue a dot and a lot of other key that wasn't working before seems to work now...
Code:
comma 0x33
apostrophe 0x33 shift
period 0x34 shift

But there are some side effect. Some keys are now not properly translated and errors are displayed on the KVM client. But the "important" keys (like dot) works... Here is a screenshot for invalid key translation when I press the key É and #:

http://ow.ly/i/8eVD
 
Last edited by a moderator:
I have finally mapped most missing keycode in the fr-ca keymap... The keys that are not working are "dead_keys". Anyone knows how to manage dead key properly?

If you are using fr-ca keyboard layout (french canada) and having problem in KVM guest, add the following entries at the end of the file /usr/share/kvm/keymaps/fr-ca

Code:
#hardcoded keys
minus 0x0c
numbersign 0x29
Eacute 0x35 shift
equal 0xd
semicolon 0x27
colon 0x27 shift
less 0x2b
greater 0x2b shift
comma 0x33
apostrophe 0x33 shift
period 0x34 shift

All components of the system use fr-ca keymap (the pvehost, the kvm guest and the client that connects to the java VNC console).

Thanks again dietmar...
 
Last edited by a moderator:
I have finally mapped most missing keycode in the fr-ca keymap... The keys that are not working are "dead_keys". Anyone knows how to manage dead key properly?

Maybe that is a problem of our java based VNC viewer. Please can you use another VNC viewer to test keymaps?

If you are using fr-ca keyboard layout (french canada) and having problem in KVM guest, add the following entries

Would you mind to report those findings to the upstream qemu project?
 
Last edited by a moderator:

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!