chain-to-keymap in keymap%
Multiple keymaps can be chained off one keymap using
chain-to-keymap. When keymaps are chained off a main keymap, events not handled by
the main keymap are passed to the chained keymaps until some chained
keymap handles the events. Keymaps can be chained together in an
arbitrary acyclic graph.
Keymap chaining is useful because multiple-event sequences are handled
correctly for chained groups. Without chaining, a sequence of events
can produce state in a keymap that must be reset when a callback is
invoked in one of the keymaps. This state can be manually cleared
with
break-sequence, though calling the
break-sequence method also invokes the handler installed by
set-break-sequence-callback.
(-> voidsenda-keymapchain-to-keymapnextprefix?)
next:keymap%object
prefix?: booleanThe
nextkeymap will be used to handle events which are not handled by this keymap. Ifprefix?is a true value, thennextwill take precedence over other keymaps already chained to this one.