Key binding

From LQWiki
Jump to navigation Jump to search

A key binding is a mapping from keystrokes and combinations to events to be delivered to the active application.

There is generally a default keybinding, which can be modified on a per-user basis, or even by executing scripts to make the changes.

Example

For example, on a US standard keyboard (and probably many others) one can swap the effects of the Caps-Lock and the left Control keys using a file like this:

remove Lock    = Caps_Lock
remove Control = Control_L Control_R

keycode 0x42 =	Control_L	NoSymbol	Control_L
keycode 0x25 =	Caps_Lock	NoSymbol	Caps_Lock

add    Lock    = Caps_Lock
add    Control = Control_L Control_R

and the command

xmodmap /full-path-to-file

See the documentation of xmodmap for details -- there are a lot of them.

Links

See Also