Bug 860669 - Keyboard: AltGr+V does not work with some non-us keyboard layout
Keyboard: AltGr+V does not work with some non-us keyboard layout
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: i18n, Regression
Depends On:
Blocks: 886216
  Show dependency treegraph
 
Reported: 2012-09-26 08:46 EDT by Marian Krcmarik
Modified: 2013-02-21 04:33 EST (History)
15 users (show)

See Also:
Fixed In Version: virt-viewer-0.5.2-17.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:33:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
screenshot (1.11 MB, image/jpeg)
2012-10-18 08:56 EDT, Marc-Andre Lureau
no flags Details

  None (edit)
Description Marian Krcmarik 2012-09-26 08:46:25 EDT
Description of problem:
Keyboard: Altgr+V does not work with some non-us keyboard layout, for example:
Czech layout - Altgr+V = @
Spanish layout - Altgr+V = “

This problem does not occur with spicec.

Version-Release number of selected component (if applicable):
spice-gtk-0.14-2.el6.x86_64
virt-viewer-0.5.2-11.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Change keyboard layout on RHEL6 guest to Czech (cs) and Keep US layout on RHEL client.
2. Press "AltGr+V" in gedit for example
  
Actual results:
@ should be displayed.

Expected results:
Nothing sent to guest.

Additional info:
Workaround - set cz layout on client as well (which is a regression in comparison with spicec)
Comment 1 Marian Krcmarik 2012-09-26 08:48:48 EDT
>   
> Actual results:
> @ should be displayed.
> 
> Expected results:
> Nothing sent to guest.
> 
I switched Actual and Expected results, indeed.
Comment 4 Marc-Andre Lureau 2012-10-17 17:54:40 EDT
I can reproduce, it seems to be related to gtk key repeat code...
Comment 5 Marc-Andre Lureau 2012-10-18 08:55:10 EDT
(In reply to comment #4)
> I can reproduce, it seems to be related to gtk key repeat code...

false alert, I had my gnome client configured with wrong keyboard options.

You can see in the screenshot that f17 -> rhel6 -> debian still passes altgr+v correctly, and the correct is correct at the end.

Please check your keyboard settings (verify the scancode is 108 with xev in the guest, make sure the key doesn't repeat)
Comment 6 Marc-Andre Lureau 2012-10-18 08:56:03 EDT
Created attachment 629360 [details]
screenshot
Comment 7 Marian Krcmarik 2012-10-18 10:24:03 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > I can reproduce, it seems to be related to gtk key repeat code...
> 
> false alert, I had my gnome client configured with wrong keyboard options.
> 
> You can see in the screenshot that f17 -> rhel6 -> debian still passes
> altgr+v correctly, and the correct is correct at the end.
> 
> Please check your keyboard settings (verify the scancode is 108 with xev in
> the guest, make sure the key doesn't repeat)

Can you try close and reopen remote-viewer before sending Altgr+v to the guest? It seems It now works for me when I open remote-viewer for first time after boot, and It does not work after and close and open again the remote-viewer (even though It does not work for my coworker even after boot immediately).

What I can see on the guest with XEV is Alt_R with keycode 108 but nothing else no v/@ with 55 as I can see on the client or guest displayed by spicec.

Btw, keep english layout on the client machine.
Comment 8 Marc-Andre Lureau 2012-10-18 15:32:52 EDT
(In reply to comment #7)
> Can you try close and reopen remote-viewer before sending Altgr+v to the
> guest? It seems It now works for me when I open remote-viewer for first time
> after boot, and It does not work after and close and open again the
> remote-viewer (even though It does not work for my coworker even after boot
> immediately).
> 
> What I can see on the guest with XEV is Alt_R with keycode 108 but nothing
> else no v/@ with 55 as I can see on the client or guest displayed by spicec.
> 
> Btw, keep english layout on the client machine.

I really can't reproduce, I don't know what to say :) You need to investigate a bit more for me with xev and changing keyboard settings or client version (rhel vs fedora etc)? I tried with current spice-gtk git and spice-gtk from rhel6, with english keyboard layout on client and debian guest with czech layout.
Comment 9 Marian Krcmarik 2012-10-26 06:41:59 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > Can you try close and reopen remote-viewer before sending Altgr+v to the
> > guest? It seems It now works for me when I open remote-viewer for first time
> > after boot, and It does not work after and close and open again the
> > remote-viewer (even though It does not work for my coworker even after boot
> > immediately).
> > 
> > What I can see on the guest with XEV is Alt_R with keycode 108 but nothing
> > else no v/@ with 55 as I can see on the client or guest displayed by spicec.
> > 
> > Btw, keep english layout on the client machine.
> 
> I really can't reproduce, I don't know what to say :) You need to
> investigate a bit more for me with xev and changing keyboard settings or
> client version (rhel vs fedora etc)? I tried with current spice-gtk git and
> spice-gtk from rhel6, with english keyboard layout on client and debian
> guest with czech layout.

Hard to say for me something as well, anyway:

- It seems that It's not reproducible over slow network with some latency so maybe related to the changes with delay between pressed keys? I can reproduce on localhost or 1Gps network.

- I have latest stuff from RHEL6.4 (spice-gtk-0.14-4.el6.x86_64, virt-viewer-0.5.2-16.el6.x86_64) and It seems that even I have focus with remote-viewer, the default keyboard shortcut for changing keyboard layout Shift+Caps Lock is caught by client and not by guest so keyboard layout is changed on the client so just be sure you have us layout on the client and czech/spanish on the guest, and standard us, not the programming one which works fine.

This is my client:
$ setxkbmap -v | awk -F "+" '/symbols/ {print $2}'
us

This is my guest:
$ setxkbmap cz
$ setxkbmap -v | awk -F "+" '/symbols/ {print $2}'
cz

The client can accept Altgr+V correctly with code 108 (caught by xev).

Possibly I could provide VNC session to such client.
Comment 11 Christophe Fergeau 2012-11-30 08:45:38 EST
I finally managed to reproduce something similar on a RHEL6.4 client. However, what I'm seeing in the 'V' in altgr+v not passing through at all when looking at xev. Similarly, AltGr + f, AltGr + h, .. are not passing through when this corresponds to a mnemonic keyboard shortcut for one of virt-viewer's menus. My guess is that something unexpected happens in virt_viewer_window_{enable,disable}_modifiers, will look more into it.
Comment 12 Christophe Fergeau 2012-11-30 10:57:14 EST
This has already been fixed in virt-viewer.git for a while (thanks Marc-André!). http://git.fedorahosted.org/cgit/virt-viewer.git/commit/?id=a48856f10e4ae23c86b8886430f631748ccfd7d7 fixes that issue.
Comment 13 Marian Krcmarik 2012-11-30 11:01:19 EST
(In reply to comment #12)
> This has already been fixed in virt-viewer.git for a while (thanks
> Marc-André!).
> http://git.fedorahosted.org/cgit/virt-viewer.git/commit/
> ?id=a48856f10e4ae23c86b8886430f631748ccfd7d7 fixes that issue.

which means already included in the latest build? or virt-viewer must have been rebased from April, right?
Comment 14 Christophe Fergeau 2012-11-30 11:12:20 EST
virt-viewer hasn't been rebased in 6.4, it's still based on virt-viewer 0.5.2 + backported patches (latest upstream is 0.5.4). This patch isn't in the latest build either (0.5.2-16)
Comment 15 Marian Krcmarik 2012-11-30 11:17:13 EST
(In reply to comment #14)
> virt-viewer hasn't been rebased in 6.4, it's still based on virt-viewer
> 0.5.2 + backported patches (latest upstream is 0.5.4). This patch isn't in
> the latest build either (0.5.2-16)

Oh thanks for info, maybe that explains why Marc-Andre could not reproduce.
Comment 19 Geyang Kong 2012-12-06 01:10:37 EST
This bug can be reproduced by following build:
virt-viewer-0.5.2-16.el6

Verified pass on the following build:
virt-viewer-0.5.2-17.el6

Steps:
1. Install a RHEL6.3 VM
2. In VM, run #setxkbmap cz
3. Press Alt_R+v
4. In VM, run #setxkbmap es
5. Press Alt_R+v

Actual result:
1. After step 3 and 5, On virt-viewer-0.5.2-16.el6, nothing happened
2. After step 3, on virt-viewer-0.5.2-17.el6, print '@'
3. After step 5, on virt-viewer-0.5.2-17.el6, print '"'

So mark this bug as VERIFIED.
Comment 21 errata-xmlrpc 2013-02-21 04:33:40 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0361.html

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