Bug 606514 - < and > keys produce wrong keycode in virtual machine
Summary: < and > keys produce wrong keycode in virtual machine
Keywords:
Status: CLOSED DUPLICATE of bug 586201
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk-vnc
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-21 20:31 UTC by Matti Lehti
Modified: 2010-07-14 21:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-14 21:16:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
showkey -a output in virtual machine (185.63 KB, image/png)
2010-06-21 20:31 UTC, Matti Lehti
no flags Details
showkey -a output in Fedora 13 (27.19 KB, image/png)
2010-06-21 20:33 UTC, Matti Lehti
no flags Details
virsh dumpxml $GUESTNAME output (2.44 KB, application/octet-stream)
2010-07-13 18:54 UTC, Matti Lehti
no flags Details
/var/log/libvirt/qemu/$GUESTNAME.log file (8.35 KB, application/octet-stream)
2010-07-13 18:57 UTC, Matti Lehti
no flags Details

Description Matti Lehti 2010-06-21 20:31:50 UTC
Created attachment 425736 [details]
showkey -a output in virtual machine

Description of problem:
In Fedora 13 desktop my keyboard works correctly, but inside any OS run as virtual machine in same box (DOS 7.1, Gentoo, Ubuntu, FreeBSD) pressing keys "<" and ">" produce z and X.

Version-Release number of selected component (if applicable):
libvirt-0.7.7-4.fc13 (x84_64)
libvirt-client-0.7.7-4.fc13
virt-manager-0.8.4 (x84_64)

How reproducible:
always

Steps to Reproduce:
1. Use any os in virtual machine
  
Actual results:
press key < (left side of z): z
press key > (left side of z with shift): X

Expected results:
press key < (left side of z): <
press key > (left side of z with shift): >


Additional info:
I tested with both finnish and US keyboard layouts in F13 and virtual machines: always same behavior.
Pressing the same key with alt-gr produces "|" as it should.
See attached .png files for showkey -a output.

Comment 1 Matti Lehti 2010-06-21 20:33:04 UTC
Created attachment 425738 [details]
showkey -a output in Fedora 13

Comment 2 Daniel Berrangé 2010-07-12 17:21:25 UTC
Please provide the following extra info

 - virsh dumpxml $GUESTNAME
 - The corresponding /var/log/libvirt/qemu/$GUESTNAME.log file from starting the guest

Comment 3 Matti Lehti 2010-07-13 18:54:35 UTC
Created attachment 431556 [details]
virsh dumpxml $GUESTNAME output

Added virsh dumpxml output as attachment.

Comment 4 Matti Lehti 2010-07-13 18:57:15 UTC
Created attachment 431559 [details]
/var/log/libvirt/qemu/$GUESTNAME.log file

Comment 5 Daniel Berrangé 2010-07-14 10:00:49 UTC
The graphics tag for the guest has an explicit keymap set:

    <graphics type='vnc' port='5900' autoport='yes' keymap='fi'/>

This breaks the automatic scancode mapping that is necessary to get a properly functional keyboard. Shutdown the guest, then use 'virsh edit $GUESTNAME' and remove the keymap='fi' attribute. Then it should be possible to get correct keymap behaviour simply by setting the keymap inside the guest OS.

NB this requires use of virt-manager or virt-viewer or vinagre.  Traditional vnc clients like TightVNC will never work properly with non-US layouts.

Comment 6 Matti Lehti 2010-07-14 21:07:03 UTC
After manually removing the keymap='fi' attribute keyboard works ok in guest OS.

I created the guests using Virtual Machine Manager 0.8.4, which seems to generate this attribute while host keyboard layout is not "us".

Comment 7 Cole Robinson 2010-07-14 21:16:21 UTC
Sounds like you are hitting 586201

*** This bug has been marked as a duplicate of bug 586201 ***


Note You need to log in before you can comment on or make changes to this bug.