From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NUoah-0000bp-9D for mharc-grub-devel@gnu.org; Tue, 12 Jan 2010 16:47:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUoaf-0000Z7-Bo for grub-devel@gnu.org; Tue, 12 Jan 2010 16:47:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUoab-0000Sm-3u for grub-devel@gnu.org; Tue, 12 Jan 2010 16:47:52 -0500 Received: from [199.232.76.173] (port=36998 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUoaa-0000Sb-K7 for grub-devel@gnu.org; Tue, 12 Jan 2010 16:47:48 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:60550 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUoaa-0000VM-5C for grub-devel@gnu.org; Tue, 12 Jan 2010 16:47:48 -0500 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTPA id A0F782894B248 for ; Tue, 12 Jan 2010 22:47:44 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 80C4E10A34; Tue, 12 Jan 2010 22:47:43 +0100 (CET) Date: Tue, 12 Jan 2010 21:47:43 +0000 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20100112214743.GA3945@pina.cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: keyboard layouts X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 21:47:53 -0000 Hi, I'm looking again to the keyboard layouts task. Plan: - Use the X11 layouts that usually are in /usr/share/X11/xkb/symbols . - Create a new module that reads the layout from an environtment variable. * Approach 1 The module will load the layout from /usr/share/X11/xkb/symbols/XX replacing the array map that currently exists in term/i386/pc/at_keyboard.c Negative points: -Grub needs acces to /usr/share/X11/xkb/symbols to load the layout -xkb files doesn't look specially nice to parse (I think that I prefer the .mo files :-) ). They are text files easy to understand for humans * Approach 2 Small program (I guess that you prefer C, Python would be nice too) that when Grub is installed would process the /usr/share/X11/xkb/symbols files and generates the files that Grub will read. Code to read this files would be much easier than before. This way, the layout tables could stay in /boot/grub/layouts . These files would look like keycode - symbol pairs. Everything already in binary, and only for the things that differ from English. So, if a layout has 40 different keycode-symbol pairs compared with English, this would be 80 bytes per layout. Probably will be more, but it should be of this order of magnitude. * End of Approach 2 Opinions? What I'm forgetting? Here appeared some suggestions: http://www.mail-archive.com/grub-devel@gnu.org/msg08301.html Like Shift+Caps Lock could write special symbols, or the very advanced (combo, dead-keys) things. I will consider it, now I'm mainly thinking about the basic layout. -- Carles Pina i Estany http://pinux.info