Go to the first, previous, next, last section, table of contents.


Binding Keys

The bind-keys function is used to install new key bindings into a keymap (either a key list or table).

Function: bind-keys keymap &rest bindings
This function installs zero or more key bindings into the keymap keymap.

Each binding is defined by two elements in the list of bindings, the first defines the name of the input event (or the event itself) and the second defines the command to be associated with the event.

For example to bind two keys in the keymap keymap; the event Ctrl-f to the command goto-next-char and the event Ctrl-b to the command goto-prev-command the following form would be used,

(bind-keys keymap
 "Ctrl-f" 'goto-next-char
 "Ctrl-b" 'goto-prev-char)

Function: unbind-keys keymap &rest keys
This function removes the bindings of the events keys (these may be the names of the events or the event objects themselves) from the keymap keymap.

(unbind-keys keymap
 "Ctrl-f"
 "Ctrl-b")


Go to the first, previous, next, last section, table of contents.