qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  alt-gr on Windows
@ 2014-12-17  0:11 Thebault, Remi
  2014-12-18 11:55 ` Kevin Wolf
  0 siblings, 1 reply; 6+ messages in thread
From: Thebault, Remi @ 2014-12-17  0:11 UTC (permalink / raw)
  To: qemu-devel

Hi list!

This is not the first post on this topic, but I haven't seen any 
solution about it.
I tested so far linux guest on windows host and the AltGr key is dead in 
the guest. (using git master branch)

On french keyboard, the keys to yield the bar "|" are alt-gr + 6.
when executing this combination on keyboard, Windows generates this:
     - L-CTRL
     - R-ALT
     - 6

in Qemu (only digged gtk UI so far), pressing alt-gr + 6 generates the 
following trace
     - L-CTRL
     - L-ALT   <-- note left here
     - 6

This comes from the Win32 call MapVirtualKey in gtk.c that maps to 
scancodes without left/right distinction.
Even when sending the right alt to the guest, the alt-gr key remains 
dead because of ctrl being virtually pressed. I found out however that 
if R-ALT + 6 is sent without the ctrl key, the guest finally recognize 
it and prints the bar, @, # and other [}{].

To make things easier, Windows delivers the ctrl code before the alt 
code, so catching it cleanly before delivery to the guest is probably tough.
I could however come to an easy and quick fix with sending the "ctrl up" 
signal to the guest before the "r-alt down" is sent.

My current code do not handle all corner cases (eg: turbo mode) and only 
fixes the gtk ui, but would such fix be accepted in the repo?
Would this break somehow the windows guest on windows host?

Thanks,
Rémi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-25 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17  0:11 [Qemu-devel] alt-gr on Windows Thebault, Remi
2014-12-18 11:55 ` Kevin Wolf
2014-12-21 17:54   ` Thebault, Remi
2015-01-01 16:24   ` Andreas Färber
2015-01-01 19:10     ` Stefan Weil
2015-01-25 16:36       ` [Qemu-devel] [PATCH v2] " Thebault, Remi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).