The key sequences to which individual commands are bound can be changed, and key bindings can be set up for commands which are not, by default, bound to any key sequences. Interactive means of modifying key bindings are described in "Key bindings" on page 92.
This section describes the editor functionbind-key
, which is used to establish bindings programmatically. If you want to alter your personal key bindings, put the modifying code in your.lispworks
file.
The default key bindings can be found in the fileconfig/key-binds.lisp
in the LispWorks library directory.
Function
editor:bind-key name key &optional kind
:global
,:mode
, or:buffer
. The default is :global,
as most key bindings are required to work throughout the editor.:buffer
applies the binding only to a specified buffer.:mode
applies the binding only to buffers in a specified major mode. editor:bind-key
is a programmatic version the editor commandBind Key
. bind-key
. (in-package 'editor) (bind-key "Forward Character" #\control-\f) (bind-key "Forward Word" #\meta-\f) (bind-key "Save File" '#(#\control-\x #\control-\s)) (bind-key "Regexp Forward Search" #\meta-control-\s) (bind-key "Complete Field" #\space :mode "Echo Area") (bind-key "Backward Character" "left") (bind-key "Forward Word" #("control-right"))editor:bind-string-to-key
Function
editor:bind-string-to-key string
key &optional kind
editor:bind-key
.