5.9 Custom Keybindings

Symex uses Lithium to implement its modal UI. You may add any custom keybindings, or customize any existing keybinding, by using the underlying Lithium facilities for this purpose (please see the Lithium documentation). For instance, to bind a key to visit an anonymous “scratch” buffer for the current major mode using the Mindstream package, you could do the following:

  (lithium-define-keys symex-editing-mode
    (("t" mindstream-enter-anonymous-session)))

PLEASE NOTE: if you use custom keybindings, it is essential to preserve the intended “exiting” behavior of the commands. For instance, all insertion commands in Symex are designated with :exit in the keybinding specification, which ensures that it exits the Lithium mode to allow you to enter text. If you choose to override these, remember to retain the :exit flag (described further in the Lithium documentation).

Also See Point-Free Modal Editing for more on the modal UI and Lithium.