Wednesday, July 27, 2016

Keyboard layout

My current laptop uses a German keyboard (QWERTZ), also I use to use another US-international, so I have to configure the system to use both.

I need to write in Spanish frequently. The default German layout (no death keys) works fine but it doesn't allow to write the ñ letter. The legacy version uses death keys and allows to write the lovely ñ.

Linux console:
To change the default keyboard layout, create the file:
# /etc/rc.d/rc.keymap

#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys de-latin1.map
fi

Xorg
This settings will affect all the Xorg application, thats include KDE and Window Maker. Just create the following config file.

# /etc/X11/xorg.conf.d/90-keyboard-layout.conf

Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "de"
Option "XkbVariant" "legacy"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

KDE
Normaly KDE will use the keymap defined by Xorg, but in the case you want to set it again in KDE, just choose the German variant German (legacy) as keyboard layout in the Input devices section of the System Settings.

There still a problem prowling around. It is the special keys, most of them works ok with the exception of the airplane mode and the increase and decrease brightness. They doesn't work, I think they are not visible in linux, but I have to check this.

Also I have to try what happens with the second keyboard, I have not tried yet.

No comments: