From 205857b2320522c5c27cce9e98ad01972fda5e92 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 4 Oct 2009 08:50:05 +0000 Subject: [PATCH] Add a key string for space ("Space") and document the names, suggested by guenther@. Also document how to bind " and ', suggested by miod@. --- key-string.c | 1 + tmux.1 | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/key-string.c b/key-string.c index 68a57f8b..55de32fe 100644 --- a/key-string.c +++ b/key-string.c @@ -57,6 +57,7 @@ struct { { "PPage", KEYC_PPAGE }, { "Tab", '\011' }, { "BTab", KEYC_BTAB }, + { "Space", ' ' }, { "BSpace", KEYC_BSPACE }, { "Enter", '\r' }, { "Escape", '\033' }, diff --git a/tmux.1 b/tmux.1 index 22351bfa..a37a5939 100644 --- a/tmux.1 +++ b/tmux.1 @@ -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