summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
AgeCommit message (Collapse)Author
2017-02-10Don't use a bufferevent for the tty, so we can keep better track of whatnicm
is being written and when. Also a manpage typo fix from jmc@.
2017-01-11Use a macro for looking up tty types.nicm
2016-11-15Initial attempt to make use of left and right margins if the terminalnicm
supports them (that is, if it advertises itself as a VT420 - probably just xterm). These are the vertical equivalent of the scroll region and allow much faster scrolling of panes that do not take up the full width of the terminal.
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-04-29Fix keys parsing again to correctly accept Unicode when not prefixednicm
with Escape.
2016-04-27Apply backspace check after working out the actual key, so that M-BSpacenicm
can work.
2016-04-26Simplify next key matching and fix problems with meta and Unicode keys.nicm
2016-03-02Handle wcwidth() and mbtowc() failures in better style and dropnicm
characters where we can't find the width (wcwidth() fails) on input, the same as we drop invalid UTF-8. Suggested by schwarze@.
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-12Allow prefix and prefix2 to be set to None to disable (useful if younicm
would rather bind the prefix in the root table).
2015-11-23Remove support for the UTF-8 mouse extension. This was a briefly used,nicm
poor idea that was fairly quickly replaced by SGR mouse input (which is now widespread). It is impossible to tell the difference between UTF-8 and non-UTF-8 mouse input; since the mouse-utf8 option was removed tmux has not handled it correctly in any case; and it is ridiculous to have three different forms of mouse input.
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-14All these return values from utf8_* are confusing, use an enum.nicm
2015-11-14Couple of assignments to remove compiler warnings.nicm
2015-11-14Be more strict about invalid UTF-8.nicm
2015-11-12Rename overly-long utf8data to ud throughout.nicm
2015-11-12Support UTF-8 key bindings by expanding the key type from int tonicm
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
2015-10-27Move struct options into options.c.nicm
2015-09-02We no longer need the terminal service class, so don't bother asking for it.nicm
2015-06-05Do not use the key variable uninitialized (in a debug log statement),nicm
reported by jungleboogie0 at gmail dot com.
2015-04-19Rewrite of tmux mouse support which was a mess. Instead of havingnicm
options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse support entirely (set -g mouse on). See the new MOUSE SUPPORT section of the man page for description of the key names and new flags (-t= to specify the pane or window under mouse as a target, and send-keys -M to pass through a mouse event). The default builtin bindings for the mouse are: bind -n MouseDown1Pane select-pane -t=; send-keys -M bind -n MouseDown1Status select-window -t= bind -n MouseDrag1Pane copy-mode -M bind -n MouseDrag1Border resize-pane -M To get the effect of turning mode-mouse off, do: unbind -n MouseDrag1Pane unbind -temacs-copy MouseDrag1Pane The old mouse options are now gone, set-option -q may be used to suppress warnings if mixing configuration files.
2014-10-22Fix some spacing nits.nicm
2014-07-21Drop explicit support for F13-F20 and change to match the xterm terminfonicm
entry: F13-F24 are S-F1 to S-F12 F25-F36 are C-F1 to C-F12 F37-F48 are C-S-F1 to C-S-F12 F49-F60 are M-F1 to M-F12 and F61-F63 are M-S-F1 to M-S-F3 This should be no difference for applications inside tmux, but means that any key binding for F13 will need to be replaced by S-F1 and so on.
2014-06-23Count mouse clicks correctly, from Balazs Kezes.nicm
2014-06-19Reset the buttons when the wheel is used, from Balazs Kezes.nicm
2014-06-19Some terminals send spurious releases for mouse wheel in SGR mouse mode,nicm
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-05-08Instead of forcing mouse scroll to 1 in choose mode, scale it downnicm
instead. Means modifier keys still increase the line count, just not as much. Based on a diff from Marcel Partap.
2014-04-03Work out mouse scroll wheel effect when the mouse is first detected andnicm
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-03A couple of trivial mouse-related style nits.nicm
2014-03-31Add names for mouse button bits rather than using magic numbers, fromnicm
Marcel Partap.
2014-02-10The last fix to xterm keys meant that some keys such as \033OA werenicm
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.
2013-10-10Assign mouse x/y coords before checking them. When receiving mousenicm
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-10Handle input mouse positions <33 (we already can generate them).nicm
2013-03-26Only accept partial keys if the timer has not expired, fixes infiniteNicholas Marriott
loop when Escape is pressed the wrong number of times.
2013-03-25Process ^[ as meta when a partial key is found.Nicholas Marriott
2013-03-24Handle focus events from the terminal, from Aaron Jensen.Nicholas Marriott
2013-03-22Support the latest theory for mouse input, this is enabled/disabled withNicholas Marriott
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-21Don't set key KEYC_NONE on xterm_keys_find match()Nicholas Marriott
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-21Fix a comment for new key table names.Nicholas Marriott
2012-11-22Put helper function back, will be needed in a bit.Nicholas Marriott
2012-10-26Make mouse event structure clearer by defining events (up, click, drag)Nicholas Marriott
and simplifying how buttons and wheels are represented, from Ailin Nemui. Should be no functional changes.
2012-09-03Can't call evtimer_pending on uninitialized events, callNicholas Marriott
evtimer_initialized first. Reported by Vladimir Lomov, fix from Thomas Adam slightly modified by me.
2012-08-21xterm won't reach version 500 for a while so set that as the upper limit.Nicholas Marriott
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-05-22Store client in tty struct directly instead of using a callback functionNicholas Marriott
pointer.
2012-05-22Store mouse data in tty structure not on the stack.Nicholas Marriott
2012-04-22Handle partial keys properly by making sure the timer has actuallyNicholas Marriott
expired, fixes problems with mintty reported by Michael Simpson.
2012-03-21Some terminals respond to secondary DA with primary (they ignore theNicholas Marriott
intermediate character). So ignore the possible responses to primary DA.
2012-03-17On xterm 271 and later, put the terminal into SCL 5 and use DECCRA forNicholas Marriott
scrolling the region in panes (if the large region check isn't hit). With help from Ailin Nemui.
2012-03-17Check event_initialized before event_del if event may not have been setNicholas Marriott
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.