[Top][All Lists]

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

Re: keyboard layouts

From: Colin Watson
Subject: Re: keyboard layouts
Date: Tue, 12 Jan 2010 22:53:54 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Jan 12, 2010 at 09:47:43PM +0000, Carles Pina i Estany wrote:
> 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.

I can't remember whether I mentioned this before, but have a look at the
gfxboot-theme-ubuntu package in Ubuntu, specifically the
scrape-console-setup script.  It makes use of console-setup to process
XKB keymaps into a form that can then be run through loadkeys and
reformatted so that gfxboot can use them.  A similar approach might be
feasible in GRUB.

(console-setup is Debian-specific, but perhaps we could incorporate the
relevant bits of it in grub-extras, or do something else creative ...)

Colin Watson                                       address@hidden

reply via email to

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