opengeodata.de

Crunchbang Keyboard Layout

2013-11-20

I looked for a simple way to change my keyboard layout on crunchbang linux (Waldorf) and found a post by Bogdan Costea and a thread in the FreeBSD forums. Following their information I did this:

sudo gedit /etc/default/keyboard

Besides XKBLAYOUT you add the desired languages (do ls -la /usr/share/X11/xkb/symbols/ for list of available languages). And XKBOPTIONS sets the keyboard shortcut. The FreeBSD-thread lists these possible shortcuts:

grp:toggle – Right Alt
grp:shift_toggle – Two Shift
grp:ctrl_shift_toggle – Ctrl+Shift
grp:alt_shift_toggle – Alt+Shift
grp:ctrl_alt_toggle – Ctrl+Alt
grp:caps_toggle – CapsLock
grp:lwin_toggle – Left "Win"
grp:rwin_toggle – Right "Win"
grp:menu_toggle – Button "Menu"

So my keyboard file looks currently like this:

XKBMODEL="pc105"
XKBLAYOUT="de,fr,us"
XKBVARIANT=""
XKBOPTIONS="grp:menu_toggle"

Bogdan suggests using the small program fbxkb to visualize the current layout. Just add the following to ~/.config/openbox/autostart:

## Run indicator for keyboard layout
fbxkb &

This will show little language indicating png-graphics in the taskbar which look like text. To replace them with actual flags go to /usr/share/fbxkb/images and overwrite the png-files (need to be superuser). One convenient way are the famfamfam flags which use the same naming convention. Just overwrite everything inside the fbxkb-folder.

Note: this still looks somehow crappy since fam³ flags are in 16x16 px and fbxkb displays in 24x24 px - but good enough for me.

And btw: if you are looking to do a ç (cedille) or other special characters without big hassle check out the German Ubuntu wiki. To enter the french ligatures like ɶ or Æ press and hold Ctrl + Shift + u and enter the hexdecimal unicode - see selfhtml or shapecatcher for info on the codes.