diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-04 08:50:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-04 08:50:06 +0000 |
commit | 4658564327f04e25e647880c251db0070641ca2f (patch) | |
tree | 996c860993c90516602307f51f7f9997d4c14a65 | |
parent | 62d59066c5df882a4a9ba4cb19d7adaeafe6a528 (diff) |
Add a key string for space ("Space") and document the names, suggested by
guenther@. Also document how to bind " and ', suggested by miod@.
-rw-r--r-- | usr.bin/tmux/key-string.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 56 |
2 files changed, 48 insertions, 11 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c index b2445b49a3f..54baeaa32b5 100644 --- a/usr.bin/tmux/key-string.c +++ b/usr.bin/tmux/key-string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-string.c,v 1.6 2009/07/28 09:18:01 nicm Exp $ */ +/* $OpenBSD: key-string.c,v 1.7 2009/10/04 08:50:05 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -57,6 +57,7 @@ struct { { "PPage", KEYC_PPAGE }, { "Tab", '\011' }, { "BTab", KEYC_BTAB }, + { "Space", ' ' }, { "BSpace", KEYC_BSPACE }, { "Enter", '\r' }, { "Escape", '\033' }, diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 472fce3a5b0..d319b9ef6a3 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.92 2009/09/24 14:17:09 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.93 2009/10/04 08:50:05 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 24 2009 $ +.Dd $Mdocdate: October 4 2009 $ .Dt TMUX 1 .Os .Sh NAME @@ -978,6 +978,50 @@ destroyed. Move up a pane. .El .Sh KEY BINDINGS +.Nm +allows a command to be bound to most keys, with or without a prefix key. +When specifying keys, most represent themselves (for example +.Ql A +to +.Ql Z +). +Ctrl keys may be prefixed with +.Ql C- +or +.Ql ^ +, and Alt (meta) with +.Ql M- . +In addition, the following special key names are accepted: +.Em BSpace , +.Em BTab , +.Em DC +(Delete), +.Em End , +.Em Enter , +.Em Escape , +.Em F1 +to +.Em F20 , +.Em Home , +.Em IC +(Insert), +.Em NPage +(Page Up), +.Em PPage +(Page Down), +.Em Space , +and +.Em Tab . +Note that to bind the +.Ql \&" +or +.Ql ' +keys, quotation marks are necessary, for example: +.Bd -literal -offset indent +bind-key '"' split-window +bind-key "'" select-prompt +.Ed +.Pp Commands related to key bindings are as follows: .Bl -tag -width Ds .It Xo Ic bind-key @@ -990,14 +1034,6 @@ Bind key .Ar key to .Ar command . -Keys may be specified prefixed with -.Ql C- -or -.Ql ^ -for Ctrl keys, or -.Ql M- -for Alt (meta) keys. -.Pp By default (without .Fl t ) the primary key bindings are modified (those normally activated with the prefix |