X11 Keyboard Tips

Default keyboard layout

On Debian based systems, you can modify the configuration stored in /etc/default/keyboard by reconfiguring the keyboard-configuration package e.g.:

$ sudo dpkg-reconfigure keyboard-configuration

Keyboard layout

Use setxkbmap to change the layout during a session. setxkbmap can be used to change the settings on the fly. Look at the contents of /etc/default/keyboard to see the current values. See man setxkbmap for help. E.g. The following command sets the layout to 'gb' (United Kingdom :-0 ) with the 'intl' variant and setting options of using the 'menu' key as the compose key and allowing ctrl-alt-backspace to restart X.

$ setxkbmap gb intl compose:menu,terminate:ctrl_alt_bksp

The various layouts are stored in files under /usr/share/X11/xkb/symbols e.g. the above layout is described in /usr/share/X11/xkb/symbols/gb

Each key is described as an array of normal state, shifted state, AltGr state and shifted AltGr state. The xkb_symbols "intl" section describes the variants. Note that the gb intl variant provides no method for creating the tilde symbol (asciitilde), so you may prefer not to use the intl variant (with dead keys) and use ComposeKeys with the normal gb layout to produce accented characters etc.

Mouse Pointer

Enable using the numeric keypad as a mouse pointer by pressing Ctrl-Shift-NumLock. Thereafter the mouse pointer can be used by using the arrow keys on the numeric keypad. The '5' key performs a left mouse button click.


Related Topics: ComposeKeys, GnomeTips