mirror of
https://github.com/tmux/tmux.git
synced 2024-12-12 17:38:48 +00:00
Add explicit keys for the bracketed paste sequences, both to avoid mix
ups with other keys and to make logs clearer.
This commit is contained in:
parent
adcd5aff6f
commit
8037159f93
@ -46,6 +46,10 @@ static const struct input_key_ent input_keys[] = {
|
||||
/* Backspace key. */
|
||||
{ KEYC_BSPACE, "\177", 0 },
|
||||
|
||||
/* Paste keys. */
|
||||
{ KEYC_PASTE_START, "\033[200~", 0 },
|
||||
{ KEYC_PASTE_END, "\033[201~", 0 },
|
||||
|
||||
/* Function keys. */
|
||||
{ KEYC_F1, "\033OP", 0 },
|
||||
{ KEYC_F2, "\033OQ", 0 },
|
||||
|
@ -251,6 +251,10 @@ key_string_lookup_key(key_code key)
|
||||
return ("FocusIn");
|
||||
if (key == KEYC_FOCUS_OUT)
|
||||
return ("FocusOut");
|
||||
if (key == KEYC_PASTE_START)
|
||||
return ("PasteStart");
|
||||
if (key == KEYC_PASTE_END)
|
||||
return ("PasteEnd");
|
||||
if (key == KEYC_MOUSE)
|
||||
return ("Mouse");
|
||||
if (key == KEYC_DRAGGING)
|
||||
|
4
tmux.h
4
tmux.h
@ -127,6 +127,10 @@ enum {
|
||||
KEYC_FOCUS_IN = KEYC_BASE,
|
||||
KEYC_FOCUS_OUT,
|
||||
|
||||
/* Paste brackets. */
|
||||
KEYC_PASTE_START,
|
||||
KEYC_PASTE_END,
|
||||
|
||||
/* Mouse keys. */
|
||||
KEYC_MOUSE, /* unclassified mouse event */
|
||||
KEYC_DRAGGING, /* dragging in progress */
|
||||
|
@ -165,6 +165,10 @@ static const struct tty_default_key_raw tty_default_raw_keys[] = {
|
||||
/* Focus tracking. */
|
||||
{ "\033[I", KEYC_FOCUS_IN },
|
||||
{ "\033[O", KEYC_FOCUS_OUT },
|
||||
|
||||
/* Paste keys. */
|
||||
{ "\033[200~", KEYC_PASTE_START },
|
||||
{ "\033[201~", KEYC_PASTE_END },
|
||||
};
|
||||
|
||||
/* Default terminfo(5) keys. */
|
||||
|
Loading…
Reference in New Issue
Block a user