Neomacs internally represents keys using the key
structure and key sequences using lists of key
's.
It is usually more convenient to represent keys and key sequences using Emacs-style strings, such as "C-x C-b"
. kbd
and key-description
converts between string and the internal representation.
kbd
(string)
key-description
(key &optional stream)
set-key
(keymap keyspec command)
string
, valid prefixes are:
H (Hyper), s (Super), M (Meta), C (Ctrl), S (Shift)define-keys
(keymap-name &body bindings)
When Neomacs command loop receive key events, it tries to find a command from a list of active keymaps depending on modes enabled in the buffer and the buffer focus. The active keymaps are, in precedence order:
Non-nil keymap
attributes of elements surrounding the buffer focus. Inner elements take precedence over outer elements.
Keymaps with the same name of modes enabled in current buffer. The precedence order of keymaps is the same as the corresponding modes in the buffer's class precedence list.
keymaps
(buffer)