From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KkRb9-0006h8-DN for mharc-grub-devel@gnu.org; Mon, 29 Sep 2008 18:52:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkRb5-0006cE-CQ for grub-devel@gnu.org; Mon, 29 Sep 2008 18:52:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkRb3-0006ZD-0z for grub-devel@gnu.org; Mon, 29 Sep 2008 18:52:06 -0400 Received: from [199.232.76.173] (port=44954 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkRb2-0006Yi-Mp for grub-devel@gnu.org; Mon, 29 Sep 2008 18:52:04 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:32975 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkRb1-0006uA-Sk for grub-devel@gnu.org; Mon, 29 Sep 2008 18:52:04 -0400 Received: from pinux (60.61.221.87.dynamic.jazztel.es [87.221.61.60]) by mail.pina.cat (Postfix) with ESMTP id 9B5DF288F30C6 for ; Tue, 30 Sep 2008 00:51:58 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id 1F75631C; Tue, 30 Sep 2008 00:51:52 +0200 (CEST) Date: Tue, 30 Sep 2008 00:51:52 +0200 From: Carles Pina i Estany To: The development of GRUB 2 Message-ID: <20080929225152.GA13509@pina.cat> References: <20080928215812.GC5259@pina.cat> <48E11DF2.3050804@nic.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <48E11DF2.3050804@nic.fi> User-Agent: Mutt/1.5.18 (2008-05-17) 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 22:52:08 -0000 Hello, On Sep/29/2008, Vesa J=E4=E4skel=E4inen wrote: > 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 ha= d 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 bef= ore > > :-) > >=20 > > (this is the result of some mails with Robert, so I'm copying/pasting= and > > 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; >=20 > Explain this a bit more... >=20 > 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 t= o > 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'. Spanish one is similar (well, vowells are easier to pronunce ;-) ) > > - have a new module with different layouts and variable hook > >=20 > > - when user (or grub.cfg) change some variable (KEY_LAYOUT?), this mo= dule would > > redefine the term/i386/pc/at_keybord.c char *map to KEY_LAYOUT_map (e= s_map, > > de_map, etc.) >=20 > I do not like the idea of using variable for this as it will most likel= y > require loading of keymap definition form disk. So I would prefer somet= hing: >=20 > insmod keymap > keymap /boot/grub/keyboard/fi from below problems (difficult to handle with the static char *map (that we currenty have) plus this idea from you, my understanding is that we should go having something like /usr/share/keymaps/i386/qwerty/fi.kmap.gz (change your layout and architecture, etc.) So, the layout is not an easy char *map but it's a definition inside a file. Maybe same one that Linux console? > 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 no= t > possible to code as unicode then some kinda of keyevent with flag that > this is eg. key up or something like that. I take note. All this "a bit more complicated case" if we want full layout in Grub. Actually, what I miss in Grub is some characters like / ( ) =3D " ' < > : ; . & (I don't write texts in Grub :) ) I mean, we could: a) do nothing (worst option?) b) parcial implementation (still using the char *map with different basic layouts) c) full implementation, like Linux console Do you have some strong opinion about what to do? I guess that c) is better, do we need it? Anyway, next days I will study how the Linux keymaps are working and are handled. --=20 Carles Pina i Estany GPG id: 0x17756391 http://pinux.info