RSS: Blog | Wiki | Forum

Keyboard

From Easyneufenglish

Jump to: navigation, search

Contents

[edit] Keyboard

This page describes how to add a new keyboard/keymap for the EasyGate. The point of this article is not to make the thing becomes simple but it has the objective of listing all programs and implication in the EasyOS functioning.

[edit] Keyboard in console mode

The keyboard in console mode is managed by the kernel. You have to usde the "loadkmap" utility to load each new keymap. Unfortunately, this file is directly a dump of the kernel table. So you have to generate the file from a linux system which has the "console-tools" and "busybox" tools.

[edit] Keymap generation

The keyboard is loaded from the "/etc/init.d/S30console" file, which can be found in the buildroot tree in "target/generic/target_skeleton/etc/init.d/S30console". The avalaible keyboard list on a linux system can be found in the "/usr/share/keymaps/" directory.

Example: for the swedish keyboard (se)

# ls -1 /usr/share/keymaps/i386/qwerty/
...
se-fi-ir209.kmap.gz 
se-fi-lat6.kmap.gz 
se-ir209.kmap.gz 
se-lat6.kmap.gz 
se-latin1.kmap.gz 
...

# loadkeys se-latin1 (load the se-latin1 file in the kernel)
# busybox dumpkmap > /tmp/se.kmap (dump the characters table to read it on the EasyGate)
# busybox loadkmap < /tmp/se.kmap (command used to load the characters table)

[edit] Keyboard modification in the EasyOS

# cp /tmp/se.kmap buildroot/target/generic/target_skeleton/etc/console/
# vi buildroot/target/generic/target_skeleton/etc/init.d/S30console
Replace line:
  /sbin/loadkmap < /etc/console/fr.kmap
by
  /sbin/loadkmap < /etc/console/se.kmap


[edit] Keyboard in graphical mode (X window)

xorg.conf configuration

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "CoreKeyboard"  
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "fr"
        Option          "XkbVariant"    "latin9"
EndSection

The keyboard is ignored in the actual version, since the keys have been hard coded in the file during the EasyOS compilation (buildroot/package/xorg/xorg.mk)

fr.xkm keyboard compilation

XXX

fr.xkm keyboard installation

The installation is done by using a buildroot option (BR2_PACKAGE_INSTALL_COMPILED_KEYMAP et BR2_PACKAGE_COMPILED_KEYMAP)

XXX

[edit] Changing keyboard instantly

[edit] Keyboard detction

[edit] User keyboard selection