| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These functions convert events, key sequences, or characters to textual descriptions. These descriptions are useful for including arbitrary text characters or key sequences in messages, because they convert non-printing and whitespace characters to sequences of printing characters. The description of a non-whitespace printing character is the character itself.
single-key-description, below.
If the optional argument no-angles is non-nil, the angle
brackets around function keys and event symbols are omitted; this is
for compatibility with old versions of Emacs which didn't use the
brackets.
(single-key-description ?\C-x)
=> "C-x"
(key-description "\C-x \M-y \n \t \r \f123")
=> "C-x SPC M-y SPC C-j SPC TAB SPC RET SPC C-l 1 2 3"
(single-key-description 'delete)
=> "<delete>"
(single-key-description 'C-mouse-1)
=> "<C-mouse-1>"
(single-key-description 'C-mouse-1 t)
=> "C-mouse-1"
|
single-key-description, except that control characters are
represented with a leading caret (which is how control characters in
Emacs buffers are usually displayed).
(text-char-description ?\C-c)
=> "^C"
(text-char-description ?\M-m)
=> "M-m"
(text-char-description ?\C-\M-m)
=> "M-^M"
|
key-description. You
call it with a string containing key descriptions, separated by spaces;
it returns a string or vector containing the corresponding events.
(This may or may not be a single valid key sequence, depending on what
events you use; see section 22.1 Keymap Terminology.)
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |