summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/key-string.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-02-01 09:55:07 +0000
committernicm <nicm@openbsd.org>2017-02-01 09:55:07 +0000
commit9f26c5b165048a4aff3063de32b6e6ea13b7dd57 (patch)
treea41414738d3cd08b34ef491547dd694101133ebd /usr.bin/tmux/key-string.c
parentupdate currency exchanges rates; (diff)
downloadwireguard-openbsd-9f26c5b165048a4aff3063de32b6e6ea13b7dd57.tar.xz
wireguard-openbsd-9f26c5b165048a4aff3063de32b6e6ea13b7dd57.zip
Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we need to set 1003 outside tmux in order to get all the mouse events, but then we need to suppress the ones that pane A doesn't want. This is easy in SGR mouse mode, because buttons == 3 is only used for movement events (for other events the trailing m/M marks a release instead), but in normal mouse mode we can't tell so easily. So for that, look at the previous event instead - if it is drag+release as well, then the current event is a movement event.
Diffstat (limited to 'usr.bin/tmux/key-string.c')
-rw-r--r--usr.bin/tmux/key-string.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c
index 9c7d2ec855b..b973b81102a 100644
--- a/usr.bin/tmux/key-string.c
+++ b/usr.bin/tmux/key-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-string.c,v 1.43 2017/01/11 22:36:07 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.44 2017/02/01 09:55:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -255,6 +255,12 @@ key_string_lookup_key(key_code key)
return ("Mouse");
if (key == KEYC_DRAGGING)
return ("Dragging");
+ if (key == KEYC_MOUSEMOVE_PANE)
+ return ("MouseMovePane");
+ if (key == KEYC_MOUSEMOVE_STATUS)
+ return ("MouseMoveStatus");
+ if (key == KEYC_MOUSEMOVE_BORDER)
+ return ("MouseMoveBorder");
/*
* Special case: display C-@ as C-Space. Could do this below in