1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VNC keyboard issue. Dot key is not working :(

Discussion in 'Proxmox VE 1.x: Installation and configuration' started by langloispy, Oct 7, 2010.

  1. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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!
     
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    11,012
    Likes Received:
    49
    I will try to reproduce it.

    what kind of VM - KVM or container? and what OS do you install?
     
  3. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    EDIT: The problem occurs only with KVM guest and on any OS. (Ubuntu, Windows, OSSIM,...) It works fine with openVZ
     
    #3 langloispy, Oct 8, 2010
    Last edited: Feb 16, 2011
  4. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    11,012
    Likes Received:
    49
    which kind of keyboard layout do you use on your desktop? just to make sure that I got the same here.
     
  5. whinpo

    whinpo Member

    Joined:
    Jan 11, 2010
    Messages:
    139
    Likes Received:
    0
    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 ;)
     
  6. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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)
     
  7. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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.
     
  8. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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
     
  9. sulutomy

    sulutomy New Member

    Joined:
    Jan 19, 2011
    Messages:
    4
    Likes Received:
    0
    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.
     
  10. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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 ?

    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!
     
  11. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    14,167
    Likes Received:
    69
    You need to stop the VM, the start it again to activate those changes.
     
  12. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    14,167
    Likes Received:
    69
    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.
     
  13. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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!
     
  14. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    14,167
    Likes Received:
    69
    /usr/share/kvm/keymaps/
     
  15. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    Thanks! Looking forward to solve my keyboard issue!
     
  16. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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
     
    #16 langloispy, Feb 16, 2011
    Last edited: Feb 16, 2011
  17. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    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...
     
    #17 langloispy, Feb 16, 2011
    Last edited: Feb 16, 2011
  18. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    14,167
    Likes Received:
    69
    Maybe that is a problem of our java based VNC viewer. Please can you use another VNC viewer to test keymaps?

    Would you mind to report those findings to the upstream qemu project?
     
  19. langloispy

    langloispy Member

    Joined:
    Jun 16, 2010
    Messages:
    57
    Likes Received:
    0
    I have tried with remmina and dead_keys are working properly. So it seems to be caused by the java VNC viewer...

    Done! http://www.mail-archive.com/kvm@vger.kernel.org/msg49832.html
     
    #19 langloispy, Feb 17, 2011
    Last edited: Feb 17, 2011
  20. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    14,167
    Likes Received:
    69

Share This Page