summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-send-keys.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix ASCII keys with send-keys -l.nicm2020-05-271-4/+9
|
* Use the internal representation for UTF-8 keys instead of wchar_t andnicm2020-05-251-6/+6
| | | | drop some code only needed for that.
* Separate key flags and modifiers, log key flags, make the "xterm" flagnicm2020-05-161-3/+3
| | | | more explicit and fix M- keys with a leading escape.
* Recognise extended key sequences on input (both the forms xterm offers).nicm2020-05-161-4/+2
|
* Send keys when they are complete not before (!= vs ==).nicm2020-04-141-2/+2
|
* Make client -c and -t handling common in cmd-queue.c and try to benicm2020-04-131-29/+29
| | | | | clearer about whether the client is the target client (must have a session) or not.
* Move cmdq_state into cmd-queue.c.nicm2020-04-131-3/+3
|
* Rename cmdq_shared to cmdq_state which will better reflect what it isnicm2020-04-131-3/+3
| | | | (going to be) used for.
* Store a key event not a mouse event in the shared data.nicm2020-04-131-2/+2
|
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-131-12/+17
| | | | use more clearly defined and preparation for some future work).
* Make struct cmd local to cmd.c and move it out of tmux.h.nicm2020-04-131-3/+3
|
* Some unnecessary assignments and unused variables.nicm2020-04-091-2/+2
|
* Change input path so it doesn't require a pane.nicm2020-03-191-2/+2
|
* Treat plausible but invalid keys (like C-BSpace) as literal like anynicm2020-01-131-4/+12
| | | | | other unrecognised string passed to send-keys. Reported by Anthony Sottile in GitHub issue 2049.
* Add -F flag to send-keys to expand formats in search-backward andnicm2019-11-071-3/+4
| | | | | forward copy mode commands, this makes it easier to use the cursor_word and cursor_line formats. From Anindya Mukherjee in GitHub issue 1964.
* The command item changes so can't keep getting the target out of it, need to usenicm2019-07-101-11/+12
| | | | the one from the first item. Fixes crash reported by M Kelly.
* Add a -H flag to send-keys to send literal keys given as hex numbersnicm2019-07-091-32/+47
| | | | | | (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.
* Add simple menus to tree, client, buffer modes.nicm2019-05-121-3/+3
|
* send-keys also needs to insert key commands in the right order.nicm2019-05-091-16/+18
|
* Allow multiple modes to be open in a pane. A stack of open modes is keptnicm2019-03-121-4/+10
| | | | | | and the previous restored when the top is exited. If a mode that is already on the stack is entered, the existing instance is moved to the top as the active mode rather than being opened new.
* Add a separate mode struct for the active window mode if any.nicm2019-03-071-27/+28
|
* Pass window into mode functions.nicm2018-12-181-5/+7
|
* Make key trees and some other bits static.nicm2018-08-021-4/+3
|
* Apply the xterm key flag when needed for send-keys, fixes problemnicm2017-06-281-1/+3
| | | | reported by Franky Spamschleuder.
* Insert copy mode bindings at the right place in the command queue.nicm2017-05-101-2/+2
|
* If the target pane for send-keys in in a mode with a key table (that is,nicm2017-05-091-4/+27
| | | | | | copy mode), then look the key up in the table and fire any command instead of delivering the key to the pane directly where it will be ignored. This makes C-b C-b (send-prefix) work in copy mode again.
* Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-221-6/+6
| | | | | | CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
* Store state shared between multiple commands in the queue in a sharednicm2017-04-211-2/+2
| | | | structure.
* Add support for the OSC 4 and OSC 104 palette setting escape sequences,nicm2017-01-071-4/+7
| | | | from S Gilles.
* -N without arguments needs to set prefix count for the mode command, sonicm2016-12-111-2/+3
| | | | that M-1 etc work. Reported by Theo Buehler.
* Fix send-keys with UTF-8.nicm2016-12-081-4/+9
|
* Make send -N work for all keys, not just in copy mode. From Artem Fokin.nicm2016-11-291-23/+19
|
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-161-11/+11
|
* Rewrite command queue handling. Each client still has a command queue,nicm2016-10-161-2/+2
| | | | | | | | | | | | | | | but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
* Add CMD_AFTERHOOK flag to the easy commands that don't need any special handling.nicm2016-10-141-3/+3
|
* Fundamental change to how copy mode key bindings work:nicm2016-10-111-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually.
* Add static in cmd-* and fix a few other nits.nicm2016-10-101-3/+3
|
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|
* send-keys -R should reset the input parser to ground state (so it can benicm2015-12-161-2/+2
| | | | used to escape from, for example, printf '\033]2;').
* Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-141-3/+7
| | | | using an enum and simplify the parsing code.
* Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-131-11/+17
| | | | about the order.
* Instead of every command resolving the target (-t or -s) itself, preparenicm2015-12-131-9/+6
| | | | | | | | | | | | | | | | the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
* Allow prefix and prefix2 to be set to None to disable (useful if younicm2015-12-121-11/+14
| | | | would rather bind the prefix in the root table).
* Support UTF-8 key bindings by expanding the key type from int tonicm2015-11-121-2/+3
| | | | | | 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.)
* Move struct options into options.c.nicm2015-10-271-3/+3
|
* Move input parser structs into input.c (removing fairly uselessnicm2015-05-081-17/+3
| | | | saved_cursor_[xy] formats as a side-effect).
* Rewrite of tmux mouse support which was a mess. Instead of havingnicm2015-04-191-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Instead of setting up the default keys by building the key structnicm2014-10-201-3/+1
| | | | | | | | | directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
* Remove the barely-used and unnecessary command check() function.nicm2013-10-101-3/+1
|
* Use u_char for the send-keys string to avoid mangling top-bit-setnicm2013-05-311-2/+2
| | | | | characters when they are promoted to int and passed to window_pane_key. Reported by Jacob Bang.