qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] alt-gr on Windows


From: Thebault, Remi
Subject: Re: [Qemu-devel] alt-gr on Windows
Date: Sun, 21 Dec 2014 18:54:21 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Le 18/12/2014 12:55, Kevin Wolf a écrit :
CCing Stefan Weil, who is both the Windows maintainer and the author of
commit 2777ccc5, which introduced the MapVirtualKey() call. As there is
a special case for Alt Gr in the code, I suppose he had this working
back then.

 From what I understand (which isn't much when it's about Windows), it
seems very unlikely to me that the change would break anything that is
working today; but you should probably give it some testing before
posting a patch.

Kevin
I could not find a case where this alt-gr code is actually useful.
From what I tried, MapVirtualKey can only issue 103 value with input not relevant with alt-gr.

I have attached a set of 3 patchs for review. These are the first I issue, so please tell if the format is not the one expected.
0001 handles the rhs keystrokes in ui/gtk.c
0002 triggers the ctrl up event in ui/gtk.c
0003 triggers the ctrl up event in ui/sdl2.c

I had preferred to fix directly in ui/input.c in order to fix all UI at once (including vnc and sdl1, which I cannot run on my host), but this involves adding some state accessible to ui/input.c. QemuConsole looks most relevant but is private to ui/console.c.

The fix is successful in a Linux guest.
The fix has no noticeable effect in a Windows guest, precisely because the guest internally remaps alt-gr to ctrl-alt. The one caveat I can raise is that the key combination l-ctrl + r-alt cannot be sent anymore to the guest.

Remi

Attachment: 0001-input-gtk-win32-ui-sends-r-ctrl-and-r-alt-key-events.patch
Description: Text document

Attachment: 0002-input-gtk-win32-ui-handles-altgr-key-correctly.patch
Description: Text document

Attachment: 0003-input-sdl2-win32-ui-handles-altgr-key-correctly.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]