From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8PZd-000327-PV for qemu-devel@nongnu.org; Wed, 02 Aug 2006 18:52:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G8PZc-00030r-DK for qemu-devel@nongnu.org; Wed, 02 Aug 2006 18:52:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8PZc-00030o-6O for qemu-devel@nongnu.org; Wed, 02 Aug 2006 18:52:20 -0400 Received: from [66.249.82.198] (helo=wx-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G8Pco-0003TG-U1 for qemu-devel@nongnu.org; Wed, 02 Aug 2006 18:55:39 -0400 Received: by wx-out-0102.google.com with SMTP id r21so940358wxc for ; Wed, 02 Aug 2006 15:52:19 -0700 (PDT) Message-ID: <83a4d4ca0608021552l4ebad5cbxeab2dfa6d24bbdad@mail.gmail.com> Date: Thu, 3 Aug 2006 00:52:19 +0200 From: Edu Subject: Re: [Qemu-devel] Re: AltGr keystrokes In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <83a4d4ca0608011722k66a5ecaag1cf147a035c16e1@mail.gmail.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 2006/8/2, Anthony Liguori : > > You're right, I'll submit a patch to fix that. Let me know if it helps. > Well, it indeed helps to some extent, but it's not enough. Tracking down the problem I've found out that modifiers after scancodes in keymap files are completely ignored in function parse_keyboard_layout (keymaps.c). In "es" keymap we find: quotedbl 0x03 shift at 0x03 altgr Which means " ==> Shift + 2 @ ==> AltGr + 2 Logging TightVNC client messages: [ PRESS SHIFT ] VNC msg: DOWN 0xFFE1 --> OS receives keycode: 0x2A [ PRESS 2 ] VNC msg: DOWN 0x22 --> OS receives keycode: 0x03 [ RELEASE 2 ] VNC msg: UP 0x22 --> OS receives keycode: 0x03 [ RELEASE SHIFT ] VNC msg: UP 0xFFE1 --> OS receives keycode: 0x2A This works correctly and double quote is printed, but... [ PRESS ALTGR ] VNC msg: DOWN 0xFFE3 --> OS receives keycode: 0x1D VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38 [ PRESS 2 ] VNC msg: UP 0xFFE3 --> OS receives keycode: 0x1D VNC msg: UP 0xFFEA --> OS receives keycode: 0x38 VNC msg: DOWN 0x40 --> OS receives keycode: 0x03 VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38 VNC msg: UP 0xFFE3 --> OS receives keycode: 0x1D VNC msg: UP 0xFFE3 --> OS receives keycode: 0x1D VNC msg: UP 0xFFEA --> OS receives keycode: 0x38 VNC msg: UP 0x40 --> OS receives keycode: 0x03 VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38 VNC msg: UP 0xFFE3 --> OS receives keycode: 0x1D VNC msg: UP 0xFFE3 --> OS receives keycode: 0x1D VNC msg: UP 0xFFEA --> OS receives keycode: 0x38 ... doesn't work at all. As you can see, VNC client sends messages to release AltGr modifier before sending 0x40 symbol ( @ ). It relies on the server to know how to get it. As the OS receives a bare 0x03 keycode, the resulting character is 2. Qemu should send to the OS the AltGr keydown event before the 0x03 scancode, as the keymap says. Double quote case shouldn't be affected by the extra Shift keydown event. Regards, Eduardo Felipe