summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty-keys.c
AgeCommit message (Collapse)Author
2020-01-28If we can identify the terminal as iTerm2 or as tmux, we can be sureNicholas Marriott
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.Nicholas Marriott
2020-01-13Be more specific in the DSR we are looking for so it doesn't getNicholas Marriott
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.Nicholas Marriott
2020-01-12The terminal type was never as much use as I expected so remove it inNicholas Marriott
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.Nicholas Marriott
2019-11-28Parse out DA features.Nicholas Marriott
2019-11-14Fix parsing of DA with only one argument in the response and add 65 for VT520.Nicholas Marriott
2019-05-09Save mouse buttons as well as position.Nicholas Marriott
2019-05-07Treat keys in identify mode (display-panes) specially and handle themNicholas Marriott
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.Nicholas Marriott
2019-05-03Instead of processing keys all together, put them up on the clientNicholas Marriott
command queue so they are ordered correctly with the commands that they execute.
2019-04-25options_array_item_value cannot return NULL.Nicholas Marriott
2019-04-23Somehow missed these bits in last commit.Nicholas Marriott
2019-04-02Add an argument to copy commands to set the prefix for the buffer name,Nicholas Marriott
allows buffers for different sessions to be named separately.
2019-03-18Make array options a sparse tree instead of an array of char * andNicholas Marriott
remove the size limit.
2019-02-16Do not look at next key byte if the length is 0, originally from ShingoNicholas Marriott
NISHIOKA in GitHub issue 1601.
2018-10-28Do not check for a key again without an escape if only \033 is present.Nicholas Marriott
2018-10-18Support OSC 52 ? to read the top buffer inside tmux (when set-clipboardNicholas Marriott
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 soNicholas Marriott
that they are correctly translated into xterm(1)-style keys. GitHub issue 1437.
2017-10-09kind should be S-Down not S-Up.Nicholas Marriott
2017-08-29Check for complete keys before escape prefix, allows keys to be definedNicholas Marriott
with a leading escape. GitHub issue 1048.
2017-08-27Use kind and kri for S-Up/Down as well as kUP and kDN.Nicholas Marriott
2017-06-23Add user-keys option to allow user-defined keys to be set, from DanNicholas Marriott
Aloni.
2017-06-12Add explicit keys for the bracketed paste sequences, both to avoid mixNicholas Marriott
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 onNicholas Marriott
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,Nicholas Marriott
and there are some question marks about it's support.
2017-04-18Detect iTerm2 and use DECSLRM for it as well.Nicholas Marriott
2017-04-18Include client name in key logging.Nicholas Marriott
2017-02-10Don't use a bufferevent for the tty, so we can keep better track of whatNicholas Marriott
is being written and when. Also a manpage typo fix from jmc@.
2017-01-11Use a macro for looking up tty types.Nicholas Marriott
2016-11-15Initial attempt to make use of left and right margins if the terminalNicholas Marriott
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.Nicholas Marriott
2016-04-29Fix keys parsing again to correctly accept Unicode when not prefixedNicholas Marriott
with Escape.
2016-04-27Apply backspace check after working out the actual key, so that M-BSpaceNicholas Marriott
can work.
2016-04-27Try again with keys parsing, tidy up further and fix single Escape press.Nicholas Marriott
2016-04-26Simplify next key matching and fix problems with meta and Unicode keys.Nicholas Marriott
2016-03-02Handle wcwidth() and mbtowc() failures in better style and dropNicholas Marriott
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.Nicholas Marriott
2015-12-12Allow prefix and prefix2 to be set to None to disable (useful if youNicholas Marriott
would rather bind the prefix in the root table).
2015-11-23Remove support for the UTF-8 mouse extension. This was a briefly used,Nicholas Marriott
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.Nicholas Marriott
2015-11-14All these return values from utf8_* are confusing, use an enum.Nicholas Marriott
2015-11-14Couple of assignments to remove compiler warnings.Nicholas Marriott
2015-11-14Be more strict about invalid UTF-8.Nicholas Marriott
2015-11-12Rename overly-long utf8data to ud throughout.Nicholas Marriott
2015-11-12Support UTF-8 key bindings by expanding the key type from int toNicholas Marriott
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.Nicholas Marriott
2015-09-02We no longer need the terminal service class, so don't bother asking for it.Nicholas Marriott
2015-06-05Do not use the key variable uninitialized (in a debug log statement),Nicholas Marriott
reported by jungleboogie0 at gmail dot com.