mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Add some missing special keys to key_string_lookup_key, fix a mouse
check in server_client_handle_key, and tweak a comment.
This commit is contained in:
parent
bf6a5c056d
commit
3bb14001b9
@ -247,8 +247,14 @@ key_string_lookup_key(key_code key)
|
||||
/* Handle special keys. */
|
||||
if (key == KEYC_UNKNOWN)
|
||||
return ("Unknown");
|
||||
if (key == KEYC_FOCUS_IN)
|
||||
return ("FocusIn");
|
||||
if (key == KEYC_FOCUS_OUT)
|
||||
return ("FocusOut");
|
||||
if (key == KEYC_MOUSE)
|
||||
return ("Mouse");
|
||||
if (key == KEYC_DRAGGING)
|
||||
return ("Dragging");
|
||||
|
||||
/*
|
||||
* Special case: display C-@ as C-Space. Could do this below in
|
||||
|
@ -758,7 +758,7 @@ server_client_handle_key(struct client *c, key_code key)
|
||||
wp = w->active;
|
||||
|
||||
/* Forward mouse keys if disabled. */
|
||||
if (key == KEYC_MOUSE && !options_get_number(s->options, "mouse"))
|
||||
if (KEYC_IS_MOUSE(key) && !options_get_number(s->options, "mouse"))
|
||||
goto forward;
|
||||
|
||||
/* Treat everything as a regular key when pasting is detected. */
|
||||
|
4
tty.c
4
tty.c
@ -565,9 +565,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
|
||||
if (mode & ALL_MOUSE_MODES) {
|
||||
/*
|
||||
* Enable the SGR (1006) extension unconditionally, as
|
||||
* this is safe from misinterpretation. Do it in this
|
||||
* order, because in some terminals it's the last one
|
||||
* that takes effect and SGR is the preferred one.
|
||||
* it is safe from misinterpretation.
|
||||
*/
|
||||
tty_puts(tty, "\033[?1006h");
|
||||
if (mode & MODE_MOUSE_BUTTON)
|
||||
|
Loading…
Reference in New Issue
Block a user