aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2017-06-12 07:04:24 +0000
committernicm <nicm>2017-06-12 07:04:24 +0000
commit8037159f937def4bb71dbfb8d664a96de794014f (patch)
treeaf92955555dbdf03f4983f50eb4fe48381c3172a
parentadcd5aff6fb86036ef736c10b04005da77a465f6 (diff)
downloadrtmux-8037159f937def4bb71dbfb8d664a96de794014f.tar.gz
rtmux-8037159f937def4bb71dbfb8d664a96de794014f.tar.bz2
rtmux-8037159f937def4bb71dbfb8d664a96de794014f.zip
Add explicit keys for the bracketed paste sequences, both to avoid mix
ups with other keys and to make logs clearer.
-rw-r--r--input-keys.c4
-rw-r--r--key-string.c4
-rw-r--r--tmux.h4
-rw-r--r--tty-keys.c4
4 files changed, 16 insertions, 0 deletions
diff --git a/input-keys.c b/input-keys.c
index 01b00b05..c0314db4 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -46,6 +46,10 @@ static const struct input_key_ent input_keys[] = {
/* Backspace key. */
{ KEYC_BSPACE, "\177", 0 },
+ /* Paste keys. */
+ { KEYC_PASTE_START, "\033[200~", 0 },
+ { KEYC_PASTE_END, "\033[201~", 0 },
+
/* Function keys. */
{ KEYC_F1, "\033OP", 0 },
{ KEYC_F2, "\033OQ", 0 },
diff --git a/key-string.c b/key-string.c
index dc09ed98..e1413a15 100644
--- a/key-string.c
+++ b/key-string.c
@@ -251,6 +251,10 @@ key_string_lookup_key(key_code key)
return ("FocusIn");
if (key == KEYC_FOCUS_OUT)
return ("FocusOut");
+ if (key == KEYC_PASTE_START)
+ return ("PasteStart");
+ if (key == KEYC_PASTE_END)
+ return ("PasteEnd");
if (key == KEYC_MOUSE)
return ("Mouse");
if (key == KEYC_DRAGGING)
diff --git a/tmux.h b/tmux.h
index f97caf33..e8f75aff 100644
--- a/tmux.h
+++ b/tmux.h
@@ -127,6 +127,10 @@ enum {
KEYC_FOCUS_IN = KEYC_BASE,
KEYC_FOCUS_OUT,
+ /* Paste brackets. */
+ KEYC_PASTE_START,
+ KEYC_PASTE_END,
+
/* Mouse keys. */
KEYC_MOUSE, /* unclassified mouse event */
KEYC_DRAGGING, /* dragging in progress */
diff --git a/tty-keys.c b/tty-keys.c
index d7797a9c..89745e0c 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -165,6 +165,10 @@ static const struct tty_default_key_raw tty_default_raw_keys[] = {
/* Focus tracking. */
{ "\033[I", KEYC_FOCUS_IN },
{ "\033[O", KEYC_FOCUS_OUT },
+
+ /* Paste keys. */
+ { "\033[200~", KEYC_PASTE_START },
+ { "\033[201~", KEYC_PASTE_END },
};
/* Default terminfo(5) keys. */