version 1.201, 2016/11/23 17:01:24 |
version 1.202, 2016/11/24 13:46:50 |
|
|
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) |
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) |
return; |
return; |
w = s->curw->window; |
w = s->curw->window; |
if (KEYC_IS_MOUSE(key)) |
|
wp = cmd_mouse_pane(m, NULL, NULL); |
|
else |
|
wp = w->active; |
|
|
|
/* Update the activity timer. */ |
/* Update the activity timer. */ |
if (gettimeofday(&c->activity_time, NULL) != 0) |
if (gettimeofday(&c->activity_time, NULL) != 0) |
|
|
|
|
m->valid = 1; |
m->valid = 1; |
m->key = key; |
m->key = key; |
|
|
if (!options_get_number(s->options, "mouse")) |
|
goto forward; |
|
} else |
} else |
m->valid = 0; |
m->valid = 0; |
|
|
|
/* Find affected pane. */ |
|
if (KEYC_IS_MOUSE(key) && m->valid) |
|
wp = cmd_mouse_pane(m, NULL, NULL); |
|
else |
|
wp = w->active; |
|
|
|
/* Forward mouse keys if disabled. */ |
|
if (key == KEYC_MOUSE && !options_get_number(s->options, "mouse")) |
|
goto forward; |
|
|
/* Treat everything as a regular key when pasting is detected. */ |
/* Treat everything as a regular key when pasting is detected. */ |
if (!KEYC_IS_MOUSE(key) && server_client_assume_paste(s)) |
if (!KEYC_IS_MOUSE(key) && server_client_assume_paste(s)) |
goto forward; |
goto forward; |
|
|
table = c->keytable; |
table = c->keytable; |
else |
else |
table = key_bindings_get_table(name, 1); |
table = key_bindings_get_table(name, 1); |
|
if (wp == NULL) |
|
log_debug("key table %s (no pane)", table->name); |
|
else |
|
log_debug("key table %s (pane %%%u)", table->name, wp->id); |
|
|
/* Try to see if there is a key binding in the current table. */ |
/* Try to see if there is a key binding in the current table. */ |
bd_find.key = key; |
bd_find.key = key; |