docs: mention that a key can be bound to a string

master
Benno Schulenberg 2018-02-27 20:11:17 +01:00
parent 3b8c898880
commit 7f88eff96f
2 changed files with 19 additions and 2 deletions

View File

@ -1041,7 +1041,7 @@ in one of the system-installed files (which normally are not writable).
@node Rebinding Keys
@section Rebinding Keys
Key bindings can be changed via the following two commands in a
Key bindings can be changed via the following three commands in a
nanorc file:
@table @code
@ -1050,6 +1050,13 @@ nanorc file:
Rebinds @code{key} to @code{function} in the context of @code{menu}
(or in all menus where the function exists by using @code{all}).
@item bind key "string" menu
Makes @code{key} produce @code{string} in the context of @code{menu}
(or in all menus where the key exists when @code{all} is used).
The @code{string} can consist of text or commands or a mix of them.
(To enter a command into the @code{string}, precede its keystroke
with @kbd{M-V}.)
@item unbind key menu
Unbinds @code{key} from @code{menu}
(or from all menus where it exists by using @code{all}).

View File

@ -395,16 +395,26 @@ slightly improve a syntax defined in one of the system-installed
files (which normally are not writable).
.SH REBINDING KEYS
Key bindings can be changed via the following two commands:
Key bindings can be changed via the following three commands:
.RS 3
.TP
.BI bind " key function menu"
Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
context of menu \fImenu\fP (or in all menus where the function exists
by using \fBall\fP).
.TP
.BI bind " key " """" string """" " menu"
Makes the given \fIkey\fR produce the given \fIstring\fR in the given
\fImenu\fR (or in all menus where the key exists when \fBall\fR is used).
The \fIstring\fR can consist of text or commands or a mix of them.
(To enter a command into the \fIstring\fR, precede its keystroke
with \fBM-V\fR.)
.TP
.BI unbind " key menu"
Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all
menus where it exists by using \fBall\fP).
.RE
.TP
The format of \fIkey\fP should be one of: