summaryrefslogtreecommitdiffstats
path: root/cmd-send-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-02-02 00:15:28 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-02-02 00:15:28 +0000
commitefb639e1d20d2bd4948dfb2d7c4ede929c423b5f (patch)
treecbe02a10bd6a3b82fd760f170ce35ad33c8dee35 /cmd-send-keys.c
parent8363d19307c476f6434a91b79fd962814f6acc1a (diff)
Add -l flag to send-keys to send input literally (without translating
key names). From Frank Terbeck.
Diffstat (limited to 'cmd-send-keys.c')
-rw-r--r--cmd-send-keys.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c
index 2e4775aa..5c92f7dc 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++)