mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 20:24:21 +00:00
Add Kitty keyboard protocol support
This commit is contained in:
11
window.c
11
window.c
@@ -2033,7 +2033,8 @@ window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len)
|
||||
}
|
||||
|
||||
static void
|
||||
window_pane_copy_key(struct window_pane *wp, key_code key)
|
||||
window_pane_copy_key(struct window_pane *wp, key_code key,
|
||||
int extended_encoding)
|
||||
{
|
||||
struct window_pane *loop;
|
||||
|
||||
@@ -2044,7 +2045,7 @@ window_pane_copy_key(struct window_pane *wp, key_code key)
|
||||
(~loop->flags & PANE_INPUTOFF) &&
|
||||
window_pane_is_visible(loop) &&
|
||||
options_get_number(loop->options, "synchronize-panes"))
|
||||
input_key_pane(loop, key, NULL);
|
||||
input_key_pane(loop, key, NULL, extended_encoding);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2072,6 +2073,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
|
||||
struct winlink *wl, key_code key, struct mouse_event *m)
|
||||
{
|
||||
struct window_mode_entry *wme;
|
||||
int extended_encoding;
|
||||
|
||||
if (KEYC_IS_MOUSE(key) && m == NULL)
|
||||
return (-1);
|
||||
@@ -2094,13 +2096,14 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
|
||||
if (wp->fd == -1 || wp->flags & PANE_INPUTOFF)
|
||||
return (0);
|
||||
|
||||
if (input_key_pane(wp, key, m) != 0)
|
||||
extended_encoding = input_key_client_supports_extended(c, key);
|
||||
if (input_key_pane(wp, key, m, extended_encoding) != 0)
|
||||
return (-1);
|
||||
|
||||
if (KEYC_IS_MOUSE(key))
|
||||
return (0);
|
||||
if (options_get_number(wp->options, "synchronize-panes"))
|
||||
window_pane_copy_key(wp, key);
|
||||
window_pane_copy_key(wp, key, extended_encoding);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user