summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-02-02 00:15:28 +0000
committernicm <nicm@openbsd.org>2012-02-02 00:15:28 +0000
commitda749e0d7caea45279dbcf01c1aaf5ed543f36c7 (patch)
treecb05a43a57b353f0327e7cc6eba4a636a495d3ad
parentMove window name changes into wrapper function window_set_name, from (diff)
downloadwireguard-openbsd-da749e0d7caea45279dbcf01c1aaf5ed543f36c7.tar.xz
wireguard-openbsd-da749e0d7caea45279dbcf01c1aaf5ed543f36c7.zip
Add -l flag to send-keys to send input literally (without translating
key names). From Frank Terbeck.
-rw-r--r--usr.bin/tmux/cmd-send-keys.c9
-rw-r--r--usr.bin/tmux/tmux.19
2 files changed, 11 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c
index 128b8f64c78..9f72ad13ba5 100644
--- a/usr.bin/tmux/cmd-send-keys.c
+++ b/usr.bin/tmux/cmd-send-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-send-keys.c,v 1.10 2012/01/21 08:10:21 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.11 2012/02/02 00:15:28 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index c1da1264c45..3a9879c9ddf 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.272 2012/01/31 15:52:21 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.273 2012/02/02 00:15:28 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: January 31 2012 $
+.Dd $Mdocdate: February 2 2012 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -1646,7 +1646,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
@@ -1660,6 +1660,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