slovenian keyboard layout

While setting up new installation on my laptop (ending up with AVLinux, based on Debian Squeeze and Awesome window manager), there are million little things that don’t work exactly how I want and spend too many hours on fine-tuning it. In fact, one of the things didn’t really manage to setup in the last incarnation of running OS (Ubuntu, Gnome 2) was keyboard layout. So now I managed to do it propertly – the Right Way – by editing some conf files.

So, the basic system to keyboard layouts nowadays is XKB. Layouts that XKB loads are in /usr/share/X11/xkb/symbols. I modified a slovenian layout and added a variant. At the end of /usr/share/X11/xkb/symbols/si I added:

This will give me a layout I can load with setxkbmap si usprog. The basic idea of this layout is that it is a full basic “us” layout with additional ways for three slovenian letters č, š and ž, and “serbo/croat” ć and đ. They are accessible using AltGr (right Alt) key and keys c, s, z, ‘ and d. Simple as that. AltGr + 5 provides an additional Euro currency sign.

The next step would be to create this configuration in a local (under ~/ home) location. A -config option to setxkbmap command should be the way to go, i guess.