mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23: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. */
|
/* Backspace key. */
|
||||||
{ KEYC_BSPACE, "\177", 0 },
|
{ KEYC_BSPACE, "\177", 0 },
|
||||||
|
|
||||||
|
/* Paste keys. */
|
||||||
|
{ KEYC_PASTE_START, "\033[200~", 0 },
|
||||||
|
{ KEYC_PASTE_END, "\033[201~", 0 },
|
||||||
|
|
||||||
/* Function keys. */
|
/* Function keys. */
|
||||||
{ KEYC_F1, "\033OP", 0 },
|
{ KEYC_F1, "\033OP", 0 },
|
||||||
{ KEYC_F2, "\033OQ", 0 },
|
{ KEYC_F2, "\033OQ", 0 },
|
||||||
|
@ -251,6 +251,10 @@ key_string_lookup_key(key_code key)
|
|||||||
return ("FocusIn");
|
return ("FocusIn");
|
||||||
if (key == KEYC_FOCUS_OUT)
|
if (key == KEYC_FOCUS_OUT)
|
||||||
return ("FocusOut");
|
return ("FocusOut");
|
||||||
|
if (key == KEYC_PASTE_START)
|
||||||
|
return ("PasteStart");
|
||||||
|
if (key == KEYC_PASTE_END)
|
||||||
|
return ("PasteEnd");
|
||||||
if (key == KEYC_MOUSE)
|
if (key == KEYC_MOUSE)
|
||||||
return ("Mouse");
|
return ("Mouse");
|
||||||
if (key == KEYC_DRAGGING)
|
if (key == KEYC_DRAGGING)
|
||||||
|
4
tmux.h
4
tmux.h
@ -127,6 +127,10 @@ enum {
|
|||||||
KEYC_FOCUS_IN = KEYC_BASE,
|
KEYC_FOCUS_IN = KEYC_BASE,
|
||||||
KEYC_FOCUS_OUT,
|
KEYC_FOCUS_OUT,
|
||||||
|
|
||||||
|
/* Paste brackets. */
|
||||||
|
KEYC_PASTE_START,
|
||||||
|
KEYC_PASTE_END,
|
||||||
|
|
||||||
/* Mouse keys. */
|
/* Mouse keys. */
|
||||||
KEYC_MOUSE, /* unclassified mouse event */
|
KEYC_MOUSE, /* unclassified mouse event */
|
||||||
KEYC_DRAGGING, /* dragging in progress */
|
KEYC_DRAGGING, /* dragging in progress */
|
||||||
|
@ -165,6 +165,10 @@ static const struct tty_default_key_raw tty_default_raw_keys[] = {
|
|||||||
/* Focus tracking. */
|
/* Focus tracking. */
|
||||||
{ "\033[I", KEYC_FOCUS_IN },
|
{ "\033[I", KEYC_FOCUS_IN },
|
||||||
{ "\033[O", KEYC_FOCUS_OUT },
|
{ "\033[O", KEYC_FOCUS_OUT },
|
||||||
|
|
||||||
|
/* Paste keys. */
|
||||||
|
{ "\033[200~", KEYC_PASTE_START },
|
||||||
|
{ "\033[201~", KEYC_PASTE_END },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default terminfo(5) keys. */
|
/* Default terminfo(5) keys. */
|
||||||
|
Loading…
Reference in New Issue
Block a user