From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KkNSh-0006ag-1J for mharc-grub-devel@gnu.org; Mon, 29 Sep 2008 14:27:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkNSe-0006ZH-5H for grub-devel@gnu.org; Mon, 29 Sep 2008 14:27:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkNSa-0006Xj-JF for grub-devel@gnu.org; Mon, 29 Sep 2008 14:27:06 -0400 Received: from [199.232.76.173] (port=54771 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkNSZ-0006Xb-Sp for grub-devel@gnu.org; Mon, 29 Sep 2008 14:27:03 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:42333 helo=jenni1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkNSY-0000rK-Rl for grub-devel@gnu.org; Mon, 29 Sep 2008 14:27:03 -0400 Received: from [127.0.0.1] (84.248.105.254) by jenni1.inet.fi (8.5.014) id 48DA2BD70042D328 for grub-devel@gnu.org; Mon, 29 Sep 2008 21:26:58 +0300 Message-ID: <48E11DF2.3050804@nic.fi> Date: Mon, 29 Sep 2008 21:26:58 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: The development of GRUB 2 References: <20080928215812.GC5259@pina.cat> In-Reply-To: <20080928215812.GC5259@pina.cat> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [RFC] Different keyborad layouts X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2008 18:27:08 -0000 Carles Pina i Estany wrote: > Hello, >=20 > I was thinking how we could have different keyboard layouts and after > have some ideas I sent some emails to Robert about this topic (who had = some > better ideas :-) ) >=20 > Let me to explain here some plan/design. I would like to research on it > after some weeks, but if we need some discussion we could have it befor= e > :-) >=20 > (this is the result of some mails with Robert, so I'm copying/pasting a= nd > changing some things, if I'm wrong Robert correct me!) >=20 > Plan: > - in term/i386/pc/at_keyboard.c we could have something like this: >=20 > static char english_map[] =3D { x, x, x }; > char *map =3D english_map; Explain this a bit more... Remember that in some keyboard you need to press combos in order to generate some character. Like in Finnish keyboard you press alt-gr + e in order to generate euro sign (or alt-gr + 5). Also there are multi-keypress sequences like in order to make '^' this sign you have to press ctrl + '^' button and when released then press space. If you happen to press in example 'a' after ctrl + '^' key you get '=E2'. And I do not think this is the only keyboard with this feature. Also there is those dec input sequences like alt+number sequence. In example alt (pressed) + '6', '5' you get 'A'. > - have a new module with different layouts and variable hook >=20 > - when user (or grub.cfg) change some variable (KEY_LAYOUT?), this modu= le would > redefine the term/i386/pc/at_keybord.c char *map to KEY_LAYOUT_map (es_= map, > de_map, etc.) I do not like the idea of using variable for this as it will most likely require loading of keymap definition form disk. So I would prefer somethi= ng: insmod keymap keymap /boot/grub/keyboard/fi Also remember that you most likely want to play with scancodes when transcoding keysequences. I would propose that you convert those sequences to unicode so it would be easier to process. And if key is not possible to code as unicode then some kinda of keyevent with flag that this is eg. key up or something like that.