grub-devel
[Top][All Lists]
Advanced

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

Re: keyboard layouts


From: Carles Pina i Estany
Subject: Re: keyboard layouts
Date: Tue, 12 Jan 2010 23:29:59 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

On Jan/12/2010, Colin Watson wrote:
> On Tue, Jan 12, 2010 at 09:47:43PM +0000, Carles Pina i Estany wrote:
> > Plan:

> > * 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

I haven't read about it previously.

> 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.

Legal question: gfxboot-theme-ubuntu is licensed under GPL 2. I
understand that this means that we cannot share code. In the other hand,
I think that you are the author, so you could give the copyright of this
code to the FSF if needed. Is it possible?

Integration question: some of that code is done using Perl. Actually are
quite small scripts (373 lines the longer one). I don't know if we want
to add Perl as a Grub dependency :-/, or if it's worth. We can redo the
script in C.

Ok, the process of scrape-console-setup (I have not been able to test it
yet) is to use ckbcomp to convert from XKB keymaps to the "loadkeys"
keymaps, and then does some process on this second keymaps.

My approach was avoiding ckbcomp (actually I didn't know it :-) ). The
loadkeys keymaps are easier to parse, so for me looks fine to use. In
the other hand adds a new dependency, only for the laziness of
processing the XKB layouts.

Can you write in two lines the format of the layout that gfxboot use?
(else I will try to generate it soon...)

Thanks,

-- 
Carles Pina i Estany
        http://pinux.info




reply via email to

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