summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
AgeCommit message (Collapse)Author
2020-01-28If we can identify the terminal as iTerm2 or as tmux, we can be surenicm
they support 256 and RGB colours, so set those flags too.
2020-01-28Add support for the iTerm2 DSR 1337 sequence to get the terminal version.nicm
2020-01-13Be more specific in the DSR we are looking for so it doesn't getnicm
confused with mouse sequences. Also set a flag and don't bother checking for it if we have already seen it (same for DA), and don't check if we never asked for it.
2020-01-12Detect iTerm2 and enable DECSLRM.nicm
2020-01-12The terminal type was never as much use as I expected so remove it innicm
favour of a couple of flags for the features used (DECSLRM and DECFRA). Also rename the flag for no xenl to be more obvious while here.
2020-01-12Loop over all DA features, don't skip the first.nicm
2019-11-28Parse out DA features.nicm
2019-11-14Fix parsing of DA with only one argument in the response and add 65 for VT520.nicm
2019-05-09Save mouse buttons as well as position.nicm
2019-05-07Treat keys in identify mode (display-panes) specially and handle themnicm
immediately rather than queuing them (the command can block the queue which means they were not being seen until it finished which was too late). Reported by denis@ and solene@, ok solene@.
2019-05-03Use the right index for user-keys.nicm
2019-05-03Instead of processing keys all together, put them up on the clientnicm
command queue so they are ordered correctly with the commands that they execute.
2019-04-25options_array_item_value cannot return NULL.nicm
2019-04-23Somehow missed these bits in last commit.nicm
2019-04-02Add an argument to copy commands to set the prefix for the buffer name,nicm
allows buffers for different sessions to be named separately.
2019-03-18Make array options a sparse tree instead of an array of char * andnicm
remove the size limit.
2019-02-16Do not look at next key byte if the length is 0, originally from Shingonicm
NISHIOKA in GitHub issue 1601.
2018-10-28Do not check for a key again without an escape if only \033 is present.nicm
2018-10-18Support OSC 52 ? to read the top buffer inside tmux (when set-clipboardnicm
is changed to on), also add refresh-client -l to ask tmux to use the same mechanism to get the clipboard from the terminal outside tmux. GitHub issue 1477.
2018-08-16Add the KEYC_XTERM flag to all function keys that imply a modifier sonicm
that they are correctly translated into xterm(1)-style keys. GitHub issue 1437.
2017-10-09kind should be S-Down not S-Up.nicm
2017-08-29Check for complete keys before escape prefix, allows keys to be definednicm
with a leading escape. GitHub issue 1048.
2017-08-27Use kind and kri for S-Up/Down as well as kUP and kDN.nicm
2017-06-23Add user-keys option to allow user-defined keys to be set, from Dannicm
Aloni.
2017-06-12Add explicit keys for the bracketed paste sequences, both to avoid mixnicm
ups with other keys and to make logs clearer.
2017-05-07Up to now, tmux sees \033\033[OA as M-Up and since we turned onnicm
xterm-keys by default, generates \033[1;3A instead of \033\033[OA. Unfortunately this confuses vi, which doesn't understand xterm keys and now sees Escape+Up pressed within escape-time as Escape followed by A. The issue doesn't happen in xterm itself because it gets the keys from X and can distinguish between a genuine M-Up and Escape+Up. Because xterm can, tmux can too: xterm will give us \033[1;3A (that is, kUP3) for a real M-Up and \033\033OA for Escape+Up - in fact, we can be sure any \033 preceding an xterm key is a real Escape key press because Meta would be part of the xterm key instead of a separate \033. So change tmux to recognise both sequences as M-Up for its own purposes, but generate the xterm version of M-Up only if it originally received the xterm version from the terminal. This means we will return to sending \033\033OA instead of the xterm key for terminals that do not support xterm keys themselves, but there is no practical way around this because they do not allow us to distinguish between Escape+Up and M-Up. xterm style escape sequences are now the de facto standard for these keys in any case. Problem reported by jsing@ and subsequently by Cecile Tonglet in GitHub issue 907.
2017-04-18Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,nicm
and there are some question marks about it's support.
2017-04-18Detect iTerm2 and use DECSLRM for it as well.nicm
2017-04-18Include client name in key logging.nicm
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.