From dd0c8147795c518de443c33895c614e52b42677f Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 1 Feb 2017 09:55:07 +0000 Subject: 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. --- key-string.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'key-string.c') diff --git a/key-string.c b/key-string.c index 85841dd2..b1329c1a 100644 --- a/key-string.c +++ b/key-string.c @@ -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 -- cgit