summaryrefslogtreecommitdiffstats
path: root/key-string.c
AgeCommit message (Collapse)Author
2023-01-16Mark keys sent by command and skip paste handling for them.nicm
2022-11-01Add modified Tab key sequences, from Aaron Jensen, GitHub issue 3368.nicm
2022-02-16Support more mouse buttons when the terminal sends them, GitHub issuenicm
3055.
2021-06-16Pass Ctrl keys through as is when given as hex, GitHub issue 2724.nicm
2021-06-10Move "special" keys into the Unicode PUA rather than making them top bitnicm
set, some compilers do not allow enums that are larger than int. GitHub issue 2673.
2021-06-10Add another couple of keys needed for extended keys, GitHub issue 2658.nicm
Handle modifier 9 as Meta, GitHub issue 2647.
2021-04-07Restore previous behaviour so that C-X remains the same as C-x. Instead,nicm
translate incoming extended keys so that they are consistent.
2021-04-07Fixes for extended keys: 1) allow C-x and C-X to be bound separatelynicm
since some terminals report them differently 2) use the "backspace" option to translate backspace 3) map ctrl which are have the ctrl implied (such as C-x) properly when the terminal reports both the key and the modifier. Note that any key bindings for C-X where C-x is meant must now be changed.
2020-07-06Always send xterm-style keys for M-Left and M-Right. GitHub issue 2296.nicm
2020-06-27Fix 0x Unicode character parsing, GitHub issue 2286.nicm
2020-05-25Use the internal representation for UTF-8 keys instead of wchar_t andnicm
drop some code only needed for that.
2020-05-20Fix a couple more places where the key flags need to be masked off.nicm
2020-05-20Key strings need to include the cursor and keypad flags now since thenicm
output key lookup expects them already set.
2020-05-16Separate key flags and modifiers, log key flags, make the "xterm" flagnicm
more explicit and fix M- keys with a leading escape.
2020-04-09Some unnecessary assignments and unused variables.nicm
2020-03-31Add a "second click" key type which is fired for the second click of anicm
double click, even if the timer hasn't expired to confirm it isn't actually a triple click. Provides a way for people who don't care about triple clicks or can make their commands have no side effects to avoid the double click timer delay.
2020-03-15Fix C-Space key string.nicm
2020-02-19A few fixes to make modifier keys and dragging work - need to remove thenicm
modifiers before checking for the dragging marker key, and apply them before looking up the end key. Also fix key-to-string with modifiers for special keys.
2019-11-14Add an option to set the key sent by backspace for those whose systemnicm
uses ^H rather than ^?. GitHub issue 1969.
2019-07-09Add a -H flag to send-keys to send literal keys given as hex numbersnicm
(needed for control clients to send mouse sequences). Also add some format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in GitHub issues 1832 and 1833.
2018-10-18Support for windows larger than visible on the attached client. This hasnicm
been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
2018-08-22Add StatusLeft and StatusRight mouse key modifiers for the left andnicm
right parts of the status line.
2018-07-16Add an "Any" key to run a command if a key is pressed that is not boundnicm
in the current key table. GitHub issue 1404.
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-02-22Minor bits: fix an array size, add comment, make grid_cell_entry static.nicm
2017-02-01Implement "all event" (1003) mouse mode but in a way that works. Thenicm
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.
2017-01-11Add some missing special keys to key_string_lookup_key, fix a mousenicm
check in server_client_handle_key, and tweak a comment.
2017-01-05Highlight all occurrences of search string after searching in copy mode.nicm
2016-11-23Error on invalid modifier keys.nicm
2016-10-11Support double and triple clicks (they are cumulative, so double isnicm
fired then triple), and use for select-word and select-line in copy mode. Inspired by a different solution from Omar Sandoval.
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-05-26Extend 0x1234 keys form to more bits so that Unicode keys work.nicm
2016-04-25Don't overwrite modifiers in the buffer when making UTF-8 strings,nicm
append instead.
2016-03-18Instead of reusing MouseUp at the finish of a drag, add a new keynicm
MouseDragEnd. It can be useful to bind them separately in copy mode.
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-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-26Handle unknown keys more gracefully, return a string instead of NULL.nicm
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-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.
2013-03-22In terminals with XT, turn on modifyOtherKeys=1 with the escape sequenceNicholas Marriott
and handle the most common set. Pass them through if xterm-keys is on.
2012-03-04Accept hex values as keys, needed for send-keys, based on a diff fromNicholas Marriott
George Nachman.
2012-01-21Drop the ability to have a list of keys in the prefix in favour of twoNicholas Marriott
separate options, prefix and prefix2. This simplifies the code and gets rid the data options type which was only used for this one option. Also add a -2 flag to send-prefix to send the secondary prefix key, fixing a cause of minor irritation. People who want three prefix keys are out of luck :-).
2011-10-23Alias NPage/PPage as PageDown/PgDn/PageUp/PgUp to reduce occasionalNicholas Marriott
confusion.