grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Different keyborad layouts


From: Vesa Jääskeläinen
Subject: Re: [RFC] Different keyborad layouts
Date: Mon, 29 Sep 2008 21:26:58 +0300
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

Carles Pina i Estany wrote:
> Hello,
> 
> 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 :-) )
> 
> 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 before
> :-)
> 
> (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!)
> 
> Plan:
> - in term/i386/pc/at_keyboard.c we could have something like this:
> 
>   static char english_map[] = { x, x, x };
>   char *map = 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 'â'. 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
> 
> - when user (or grub.cfg) change some variable (KEY_LAYOUT?), this module 
> 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 something:

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]