version 1.266, 2019/03/07 20:24:21 |
version 1.267, 2019/03/12 11:16:50 |
|
|
void |
void |
server_client_handle_key(struct client *c, key_code key) |
server_client_handle_key(struct client *c, key_code key) |
{ |
{ |
struct mouse_event *m = &c->tty.mouse; |
struct mouse_event *m = &c->tty.mouse; |
struct session *s = c->session; |
struct session *s = c->session; |
struct winlink *wl; |
struct winlink *wl; |
struct window *w; |
struct window *w; |
struct window_pane *wp; |
struct window_pane *wp; |
struct timeval tv; |
struct window_mode_entry *wme; |
struct key_table *table, *first; |
struct timeval tv; |
const char *tablename; |
struct key_table *table, *first; |
struct key_binding *bd; |
struct key_binding *bd; |
int xtimeout, flags; |
int xtimeout, flags; |
struct cmd_find_state fs; |
struct cmd_find_state fs; |
key_code key0; |
key_code key0; |
|
|
/* Check the client is good to accept input. */ |
/* Check the client is good to accept input. */ |
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) |
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) |
|
|
*/ |
*/ |
if (server_client_is_default_key_table(c, c->keytable) && |
if (server_client_is_default_key_table(c, c->keytable) && |
wp != NULL && |
wp != NULL && |
wp->mode != NULL && |
(wme = TAILQ_FIRST(&wp->modes)) != NULL && |
wp->mode->mode->key_table != NULL) { |
wme->mode->key_table != NULL) |
tablename = wp->mode->mode->key_table(wp->mode); |
table = key_bindings_get_table(wme->mode->key_table(wme), 1); |
table = key_bindings_get_table(tablename, 1); |
|
} |
|
else |
else |
table = c->keytable; |
table = c->keytable; |
first = table; |
first = table; |