From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6iYU-0000aV-0o for qemu-devel@nongnu.org; Thu, 01 Jan 2015 11:24:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6iYQ-0004UM-QA for qemu-devel@nongnu.org; Thu, 01 Jan 2015 11:24:57 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58813 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6iYQ-0004TU-KD for qemu-devel@nongnu.org; Thu, 01 Jan 2015 11:24:54 -0500 Message-ID: <54A574D4.5050306@suse.de> Date: Thu, 01 Jan 2015 17:24:52 +0100 From: =?windows-1252?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <20141218115528.GB25902@noname.redhat.com> In-Reply-To: <20141218115528.GB25902@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] alt-gr on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , "Thebault, Remi" Cc: sw@weilnetz.de, qemu-devel@nongnu.org, Tim Hardeck Hi, Am 18.12.2014 um 12:55 schrieb Kevin Wolf: > Am 17.12.2014 um 01:11 hat Thebault, Remi geschrieben: >> 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? >=20 > 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. >=20 > 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. Tim and colleagues have been investigating some AltGr issues on Linux / NoVNC as well, so it may well have been broken before Stefan's commit. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)