Bug#686817: grub-pc: Add option to change keyboard layout

Luc Van Rompaey luc.vanrompaey at gmail.com
Sun Jul 26 13:10:18 UTC 2015


In principle, GRUB2 allows you to change the keyboard layout through its 
'at_keyboard' input terminal.
You can use the 'grub-mklayout' utility to create a GRUB keyboard 
layout, e.g., for dvorak:

    ckbcomp dvorak | grub-mklayout -o dvorak.gkb

Create a 'layouts' subdirectory under your 'grub' directory, and copy 
the GRUB keyboard layout to it, e.g.:

    mkdir /boot/grub/layouts
    cp dvorak.gkb /boot/grub/layouts

The 'keymap' command under GRUB (e.g., in your 'grub.cfg') will then 
load the keymap:

    keymap dvorak

To actually use the keymap, you will have to switch the the 
'at_keyboard' input terminal:

    terminal_input at_keyboard

Trouble is, under a PC BIOS system, the 'at_keyboard' input terminal is 
broken.
It is unclear to me how (or even, whether) it can be fixed.

Since I, too, got frustrated that I couldn't change the keyboard layout, 
I decided to try and create my own 'ext_kbd' input terminal, for 
personal use.
The 'ext_kbd' input terminal implements something akin to the 'setkey' 
command that was available under what is now known as GRUB Legacy.
It won't go into upstream, since it deviates from the infrastructure 
that GRUB already provides for changing the keyboard layout.

In any case, I'll attach a patch that will add support for my 'ext_kbd' 
module to GRUB, in case anyone is interested enough to try it.
If you decide to apply the patch, then you will subsequently have to run 
'./autogen.sh' before you run './configure'. Otherwise, the build 
process will not pick up the definition of the 'ext_kbd' module that the 
patch adds to the 'grub-core/Makefile.core.def' file.

I'm afraid that this is the best that I can do for now.

-- Luc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20150726/0a98eafc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ext_kbd.patch
Type: text/x-patch
Size: 37972 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20150726/0a98eafc/attachment-0001.bin>


More information about the Pkg-grub-devel mailing list