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


Key Lookup

Each time the event loop (see section Event Loop) receives an input event from the window system it searches for a binding of that event.

The variables keymap-path and next-keymap-path are used to determine the keymap environment, this is the list of keymaps which are searched when looking for the binding.

Function: lookup-event-binding event &optional reset-path
This function examines the current keymap environment for a binding of the event event (see section Input Events). If such a binding is found its command is returned, otherwise nil is returned.

If the optional reset-path argument is non-nil the next-keymap-path variable will be set to nil, otherwise it will be left with its original value.

Variable: keymap-path
A buffer-local variable providing the list of keymaps (or variables whose values are keymaps) which will be searched for a binding when the value of the next-keymap-path variable is nil.

keymap-path
    => (minor-mode-keymap texinfo-keymap global-keymap)

Variable: next-keymap-path
This variable is used to create multi-event key bindings. When it has a non-nil value it overrides the keymap-path variable when a key binding is being searched for.

After the value of this variable is used to search for a key binding it is set to nil. This means that, unless another prefix key occurred, the next input event received will be resolved through the keymap-path variable.

When this variable is set the value of the prefix-arg variable is set to the current value of the current-prefix-arg variable. This is so a prefix argument given to a multi-event command is transmitted through to the command.

For more details on multi-event bindings see section Prefix Keys.


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