From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGjVM-00010U-N9 for qemu-devel@nongnu.org; Wed, 09 Jul 2008 19:55:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGjVK-0000yz-6G for qemu-devel@nongnu.org; Wed, 09 Jul 2008 19:55:24 -0400 Received: from [199.232.76.173] (port=56252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGjVJ-0000yl-Rt for qemu-devel@nongnu.org; Wed, 09 Jul 2008 19:55:21 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]:17092) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KGjVF-0002zS-0j for qemu-devel@nongnu.org; Wed, 09 Jul 2008 19:55:21 -0400 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080710000002.BFYY28496.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Thu, 10 Jul 2008 01:00:02 +0100 Received: from implementation.famille.thibault.fr ([82.21.96.230]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20080709235522.TOOY18637.aamtaout04-winn.ispmail.ntl.com@implementation.famille.thibault.fr> for ; Thu, 10 Jul 2008 00:55:22 +0100 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.69) (envelope-from ) id 1KGjVE-00044C-1M for qemu-devel@nongnu.org; Thu, 10 Jul 2008 01:55:16 +0200 Date: Thu, 10 Jul 2008 00:55:16 +0100 From: Samuel Thibault Subject: Re: [Qemu-devel] Bug in SDL key event processing Message-ID: <20080709235516.GM4889@implementation> References: <48754975.1050303@dbservice.com> <20080709233752.GL4889@implementation> <48754DF2.2010704@dbservice.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <48754DF2.2010704@dbservice.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 Tomas Carnecky, le Thu 10 Jul 2008 01:46:58 +0200, a écrit : > Samuel Thibault wrote: > >Tomas Carnecky, le Thu 10 Jul 2008 01:27:49 +0200, a écrit : > >>Why is there OS (X11/Windows) specific code in the SDL frontend? And why > >>does qemu need keymaps anyway? > > > >The keymaps are for the VNC case, where you get a keyboard symbol, not a > >keycode, so you need to know how to translate back into a scancode. > > Well, every 'frontend' needs some kind of keymap table to map the events > into bios scancodes. The VNC frontend can not do that without keymap information, and that information can be shared, and should be shared There is a fundamental difference between SDL and VNC: - SDL gets keycode, i.e. the _positional_ number of a key, i.e. for instance the 1st key of the second row, which happens to be a Q on a qwerty keyboard. That can be translated into scancodes with a fixed map table. - VNC gets symbols, i.e. the _semantic_ of a key, i.e. for instance 'Q', which has to be translated into a scancode, and there you have the problem of the expected layout of the keyboard: should that be translated into scancode for the 1st key of the 2nd row, or for the 1st key of the 3rd row (because the user has an azerty keyboard). Samuel