From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KIQu4-0007Oz-V4 for qemu-devel@nongnu.org; Mon, 14 Jul 2008 12:27:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KIQu1-0007OG-K3 for qemu-devel@nongnu.org; Mon, 14 Jul 2008 12:27:56 -0400 Received: from [199.232.76.173] (port=39431 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KIQu1-0007OD-F4 for qemu-devel@nongnu.org; Mon, 14 Jul 2008 12:27:53 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:59375) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KIQu1-0000ze-9a for qemu-devel@nongnu.org; Mon, 14 Jul 2008 12:27:53 -0400 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.69) (envelope-from ) id 1KIQtz-0003j2-BW for qemu-devel@nongnu.org; Mon, 14 Jul 2008 18:27:51 +0200 Date: Mon, 14 Jul 2008 17:27:51 +0100 From: Samuel Thibault Subject: Re: [Qemu-devel] Bug in SDL key event processing Message-ID: <20080714162751.GX4466@implementation.uk.xensource.com> References: <48757FB8.8010400@codemonkey.ws> <4875C0B6.2060302@dbservice.com> <4876101A.1080800@codemonkey.ws> <487611FC.5070500@dbservice.com> <487616BB.8020402@dbservice.com> <48761F31.4090909@codemonkey.ws> <48762C59.9010204@dbservice.com> <48766211.2090304@codemonkey.ws> <20080710215524.GB4579@implementation> <18555.30890.637466.506702@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18555.30890.637466.506702@mariner.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Ian Jackson, le Mon 14 Jul 2008 17:02:50 +0100, a écrit : > Samuel Thibault writes ("Re: [Qemu-devel] Bug in SDL key event processing"): > > That won't for the shifted characters. Let's take for instance azerty, > > which has the numbers in the shifted position instead of the direct > > position. Typing shift+1 will produce a 1 keysym, which will indeed be > > converted to the correct scancode, but shift will be simulated too, and > > thus produce in the guest '!'... There is no other correct than properly > > reverse-engineering the keysyms we get into a positional keycode, and > > then convert to PS2 scancode, and let the guest use its keymaps.. > > Well, one alternative approach would be to simulate a shift down > event, followed by the key in question, followed by a shift up event. Uuuggghh (to say the least). Even more tricky. I have an azerty keyboard. To type '\' I press alt-gr + '8'. Qemu receives a '\' keysym, with altgr being pressed. How do you know that that alt-gr is to be dropped (because it's an artifact of the azerty keyboard) or kept as is (in the qwerty case one may want to have an alt-gr + '\' shortcut)? Samuel