Commit 7f88eff9 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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

Showing with 19 additions and 2 deletions
+19 -2
......@@ -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}).
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment