(emacs)Keyboard Translations


Next: Syntax Prev: Key Bindings Up: Customization

Keyboard Translations
=====================

   Some keyboards do not make it convenient to send all the special
characters that Emacs uses.  The most common problem case is the DEL
character.  Some keyboards provide no convenient way to type this very
important character--usually because they were designed to expect the
character `C-h' to be used for deletion.  On these keyboard, if you
press the key normally used for deletion, Emacs handles the `C-h' as a
prefix character and offers you a list of help options, which is not
what you want.

   You can work around this problem within Emacs by setting up keyboard
translations to turn `C-h' into DEL and DEL into `C-h', as follows:

     ;; Translate `C-h' to DEL.
     (keyboard-translate ?\C-h ?\C-?)
     ;; Translate DEL to `C-h'.
     (keyboard-translate ?\C-? ?\C-h)

   Keyboard translations are not the same as key bindings in keymaps
(Note: Keymaps.).  Emacs contains numerous keymaps that apply in
different situations, but there is only one set of keyboard
translations, and it applies to every character that Emacs reads from
the terminal.  Keyboard translations take place at the lowest level of
input processing; the keys that are looked up in keymaps contain the
characters that result from keyboard translation.

   For full information about how to use keyboard translations, see
Note: Translating Input.


automatically generated by info2www