aboutsummaryrefslogtreecommitdiff
path: root/key-string.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-04-20 15:44:27 +0100
committerThomas Adam <thomas@xteddy.org>2015-04-20 15:44:27 +0100
commitb25dc423b0b1369aaec5dee8e051d541bd55043f (patch)
tree4ee106369e8b28504959d1b43c56daf89e196240 /key-string.c
parentacb8248ba64e1c9770d39d9790439c74eb9e5d80 (diff)
parent0fd9a97202dc2878d9cf21f3bea01b599c21e61b (diff)
downloadrtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.tar.gz
rtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.tar.bz2
rtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.zip
Merge branch 'obsd-master'
Diffstat (limited to 'key-string.c')
-rw-r--r--key-string.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/key-string.c b/key-string.c
index db968279..b6474c4f 100644
--- a/key-string.c
+++ b/key-string.c
@@ -82,6 +82,19 @@ const struct {
{ "KPEnter", KEYC_KP_ENTER },
{ "KP0", KEYC_KP_ZERO },
{ "KP.", KEYC_KP_PERIOD },
+
+ /* Mouse keys. */
+ KEYC_MOUSE_STRING(MOUSEDOWN1, MouseDown1),
+ KEYC_MOUSE_STRING(MOUSEDOWN2, MouseDown2),
+ KEYC_MOUSE_STRING(MOUSEDOWN3, MouseDown3),
+ KEYC_MOUSE_STRING(MOUSEUP1, MouseUp1),
+ KEYC_MOUSE_STRING(MOUSEUP2, MouseUp2),
+ KEYC_MOUSE_STRING(MOUSEUP3, MouseUp3),
+ KEYC_MOUSE_STRING(MOUSEDRAG1, MouseDrag1),
+ KEYC_MOUSE_STRING(MOUSEDRAG2, MouseDrag2),
+ KEYC_MOUSE_STRING(MOUSEDRAG3, MouseDrag3),
+ KEYC_MOUSE_STRING(WHEELUP, WheelUp),
+ KEYC_MOUSE_STRING(WHEELDOWN, WheelDown),
};
/* Find key string in table. */
@@ -192,7 +205,9 @@ key_string_lookup_key(int key)
/* Handle no key. */
if (key == KEYC_NONE)
- return ("none");
+ return ("<NONE>");
+ if (key == KEYC_MOUSE)
+ return ("<MOUSE>");
/*
* Special case: display C-@ as C-Space. Could do this below in