Search notes:

/usr/share/X11/xkb/symbols

This directory contains the different *language keyboard layout files. Apparently, these files are used for keyboard layouts.
If a new layout is added to this directory, it must (somehow) also be added to /usr/share/X11/xkb/rules/evdev.xml.

Syntax

Snippet taken from /usr/share/X11/xkb/symbols/latin:
    key <AE01>	{ [         1,     exclam,  onesuperior,   exclamdown ]	};
    key <AE02>	{ [         2,         at,  twosuperior,    oneeighth ]	};
    key <AE03>	{ [         3, numbersign, threesuperior,    sterling ]	};
    key <AE04>	{ [         4,     dollar,   onequarter,       dollar ]	};
Each line defines a key.
<AE01> defines a key. The second letter defines the row where it is in (E = fifth row from bottom). The 01 says it's the first key from the left. (The special characters even further left apparently don't count)
So, the x would be identified on some western keyboards with <AB02>.
Function keys are identified with FK..
After identifying the key, there are four mappings. The first is for pressing just the key, the second for combining it with the shift key, the third for combining it with the right alt key (altgr) and the fourth for combining it with shift+altgr.

See also

X keyboard extension
XKB
XKB database: symbols

Links

http://ubuntuforums.org/showthread.php?t=188761

Index