Commit Graph

154 Commits

Author SHA1 Message Date
Thomas Adam
814e40522c Merge branch 'obsd-master' 2014-06-20 12:59:43 +01:00
nicm
fd9a53b4a4 Reset the buttons when the wheel is used, from Balazs Kezes. 2014-06-19 07:32:12 +00:00
nicm
a94696defa Some terminals send spurious releases for mouse wheel in SGR mouse mode,
this causes confusion when tmux uses SGR outside but the application
inside tmux is using conventional xterm mouse reporting. So suppress
obviously bad input. From Timothy Allen, SF bug 128.
2014-06-19 07:26:43 +00:00
Thomas Adam
bae95844d7 Merge branch 'obsd-master'
Conflicts:
	format.c
	window.c
2014-05-13 21:58:48 +01:00
nicm
94ccc6aeaa Instead of forcing mouse scroll to 1 in choose mode, scale it down
instead. Means modifier keys still increase the line count, just not as
much. Based on a diff from Marcel Partap.
2014-05-08 07:54:47 +00:00
Thomas Adam
0c99c7dbff Merge branch 'obsd-master'
Conflicts:
	Makefile
	tty-keys.c
2014-04-05 12:36:14 +01:00
nicm
acef311fe3 Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.
2014-04-03 08:20:29 +00:00
nicm
8824dae6f7 A couple of trivial mouse-related style nits. 2014-04-03 08:15:17 +00:00
nicm
46593e7aa2 Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.
2014-03-31 21:40:21 +00:00
Nicholas Marriott
23e944c91d Add names for mouse button bits rather than using magic numbers, from Marcel
Partap.
2014-03-06 12:00:30 +00:00
Thomas Adam
b3de4a3dec Merge branch 'obsd-master'
Conflicts:
	tmux.1
	tmux.c
2014-02-16 23:02:07 +00:00
nicm
c52548f6fd The last fix to xterm keys meant that some keys such as \033OA were
being wrongly treated as partial matches. So both check xterm keys after
standard keys and only wildcard the minimum required ('1' to
'8'). Problems reported by Ralf Horstmann and Tim van der Molen.
2014-02-10 11:20:41 +00:00
nicm
784b711393 Assign mouse x/y coords before checking them. When receiving mouse
inputs, we should set the x/y coordinates earlier than we currently do,
so that we aren't off-by-one in the case when the statusbar is at the
top of the screen. By Thomas Adam.
2013-10-10 11:57:52 +00:00
nicm
2756d12750 Handle input mouse positions <33 (we already can generate them). 2013-10-10 11:49:42 +00:00
Thomas
5dbf3cb036 Assign mouse x/y coords before checking them
When receiving mouse inputs, we should set the x/y coordinates earlier than
we currently do, so that we aren't off-by-one in the case when the statusbar
is at the top of the screen.
2013-08-20 00:02:38 +01:00
Nicholas Marriott
7673732c0f Handle input mouse positions <33 (we already can generate them). 2013-08-02 08:51:57 +01:00
Thomas
399a15b9fc Merge branch 'obsd-master' 2013-03-26 16:59:37 +00:00
Nicholas Marriott
dfac36b6c3 Only accept partial keys if the timer has not expired, fixes infinite
loop when Escape is pressed the wrong number of times.
2013-03-26 14:14:08 +00:00
Nicholas Marriott
e2295014d9 Process ^[ as meta when a partial key is found. 2013-03-25 11:44:16 +00:00
Nicholas Marriott
a60687f9ba Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
Nicholas Marriott
c7d1849e1c Process ^[ as meta when a partial key is found. 2013-03-22 17:02:12 +00:00
Nicholas Marriott
67b4d5b609 Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.
2013-03-22 10:33:50 +00:00
Nicholas Marriott
d4785fe798 Don't set key KEYC_NONE on xterm_keys_find match()
When calling xterm_keys_find(); if we get a complete match, don't set
the key to unknown before calling the action to complete the binding;
otherwise non-prefixed bindings will not work.

From Thomas Adam
2013-03-21 18:45:38 +00:00
Nicholas Marriott
d5139d1401 Fix a comment for new key table names. 2013-03-21 16:52:02 +00:00
Nicholas Marriott
97620bb5be Add a home and end as modified by xterm in keypad mode, from Chris Johnsen. 2013-03-11 09:37:52 +00:00
Nicholas Marriott
ee0f8adfac Handle focus events from the terminal, from Aaron Jensen. 2013-02-23 10:01:34 +00:00
Nicholas Marriott
e5eee7de0c Support the latest theory for mouse input, this is enabled/disabled with SM/RM
1006 and is similar in style to SGR input: \033[<b;x;yM or \033[b;x;ym. From
Egmont Koblinger.
2013-02-18 14:52:27 +00:00
Nicholas Marriott
9d165df18a No more lint means no more ARGSUSED. 2013-02-17 23:15:38 +00:00
Nicholas Marriott
7d1a8f7e9e Remove stray test code which would convert abc to x. 2013-02-17 23:05:57 +00:00
Thomas Adam
2ac1d46f46 Don't set key KEYC_NONE on xterm_keys_find match()
When calling xterm_keys_find(); if we get a complete match, don't set the
key to unknown before calling the action to complete the binding; otherwise
non-prefixed bindings will not work.
2013-02-16 21:04:48 +00:00
Nicholas Marriott
3e270af17a Don't omit half the default table (!= not ==). 2013-02-16 13:29:40 +00:00
Nicholas Marriott
10db7ec51b Include the \033 in the key tree and adjust key matching for this change. 2013-02-16 13:21:14 +00:00
Nicholas Marriott
2bdc59fac8 Fix a comment for new key table names. 2013-02-15 02:38:15 +00:00
Nicholas Marriott
784a74df0b Fix function parameter to tty_keys_free. 2013-02-15 02:18:38 +00:00
Nicholas Marriott
82355d2f2d Tidy by splitting default key tables into two. 2013-02-15 02:16:41 +00:00
Thomas Adam
1bc910a963 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-11-22 22:19:04 +00:00
Nicholas Marriott
260419f48e Put helper function back, will be needed in a bit. 2012-11-22 14:41:11 +00:00
Thomas Adam
47fbf87185 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-10-26 20:28:58 +01:00
Nicholas Marriott
d210d99cce Make mouse event structure clearer by defining events (up, click, drag)
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.
2012-10-26 14:35:42 +00:00
Nicholas Marriott
d6066552ee Can't call evtimer_pending on uninitialized events, call
evtimer_initialized first. Reported by Vladimir Lomov, fix from Thomas
Adam slightly modified by me.
2012-09-04 22:35:52 +01:00
Nicholas Marriott
473911fb73 Can't call evtimer_pending on uninitialized events, call
evtimer_initialized first. Reported by Vladimir Lomov, fix from Thomas
Adam slightly modified by me.
2012-09-03 06:26:48 +00:00
Tiago Cunha
fc8d3f7a56 Sync OpenBSD patchset 1166:
xterm won't reach version 500 for a while so set that as the upper limit.
2012-08-31 09:22:50 +00:00
Nicholas Marriott
d39c58c01c xterm won't reach version 500 for a while so set that as the upper limit. 2012-08-21 10:08:11 +00:00
Tiago Cunha
a432fcd306 Sync OpenBSD patchset 1150:
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11 19:34:16 +00:00
Nicholas Marriott
df912e3540 xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
Tiago Cunha
17da2f7d5f Sync OpenBSD patchset 1121:
Store client in tty struct directly instead of using a callback function
pointer.
2012-05-22 21:05:30 +00:00
Tiago Cunha
fff7c0b276 Sync OpenBSD patchset 1120:
Store mouse data in tty structure not on the stack.
2012-05-22 21:04:25 +00:00
Nicholas Marriott
84c708f355 Store client in tty struct directly instead of using a callback function
pointer.
2012-05-22 14:32:28 +00:00
Nicholas Marriott
fe4f00834d Store mouse data in tty structure not on the stack. 2012-05-22 14:11:30 +00:00
Tiago Cunha
bdfbb52951 Sync OpenBSD patchset 1094:
Handle partial keys properly by making sure the timer has actually
expired, fixes problems with mintty reported by Michael Simpson.
2012-04-24 16:17:57 +00:00