aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-02-02 02:01:18 +0000
committerTiago Cunha <tcunha@gmx.com>2012-02-02 02:01:18 +0000
commit94e46dd72468d364bb395603cf7fc9ae594ebd41 (patch)
tree326d2f94f92611ed0fd8c745d189f70cd29da664
parentc82e06804e41af6b13b3a75e0268f32fbc4a4210 (diff)
downloadrtmux-94e46dd72468d364bb395603cf7fc9ae594ebd41.tar.gz
rtmux-94e46dd72468d364bb395603cf7fc9ae594ebd41.tar.bz2
rtmux-94e46dd72468d364bb395603cf7fc9ae594ebd41.zip
Sync OpenBSD patchset 1025:
Add -l flag to send-keys to send input literally (without translating key names). From Frank Terbeck.
-rw-r--r--cmd-send-keys.c7
-rw-r--r--tmux.15
2 files changed, 8 insertions, 4 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c
index 34037418..79a21647 100644
--- a/cmd-send-keys.c
+++ b/cmd-send-keys.c
@@ -31,8 +31,8 @@ int cmd_send_keys_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_send_keys_entry = {
"send-keys", "send",
- "Rt:", 0, -1,
- "[-R] [-t target-pane] key ...",
+ "lRt:", 0, -1,
+ "[-lR] [-t target-pane] key ...",
0,
NULL,
NULL,
@@ -71,7 +71,8 @@ cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
for (i = 0; i < args->argc; i++) {
str = args->argv[i];
- if ((key = key_string_lookup_string(str)) != KEYC_NONE) {
+ if (!args_has(args, 'l') &&
+ (key = key_string_lookup_string(str)) != KEYC_NONE) {
window_pane_key(wp, s, key);
} else {
for (; *str != '\0'; str++)
diff --git a/tmux.1 b/tmux.1
index 18b5ffea..670e1406 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1650,7 +1650,7 @@ are listed; this may be one of:
or
.Em emacs-copy .
.It Xo Ic send-keys
-.Fl R
+.Op Fl lR
.Op Fl t Ar target-pane
.Ar key Ar ...
.Xc
@@ -1664,6 +1664,9 @@ or
.Ql npage
) to send; if the string is not recognised as a key, it is sent as a series of
characters.
+The
+.Fl l
+flag disables key name lookup and sends the keys literally.
All arguments are sent sequentially from first to last.
The
.Fl R