Add key-table option to set the default key table for a session, allows

different key bindings for different sessions and a few other things.
This commit is contained in:
nicm
2015-12-12 18:32:24 +00:00
parent 6a50cf89b4
commit 5ed17e84fa
10 changed files with 52 additions and 10 deletions

View File

@ -1035,6 +1035,7 @@ void
format_defaults_client(struct format_tree *ft, struct client *c)
{
struct session *s;
const char *name;
if (ft->s == NULL)
ft->s = c->session;
@ -1052,7 +1053,8 @@ format_defaults_client(struct format_tree *ft, struct client *c)
format_add_tv(ft, "client_created", &c->creation_time);
format_add_tv(ft, "client_activity", &c->activity_time);
if (strcmp(c->keytable->name, "root") == 0)
name = server_client_get_key_table(c);
if (strcmp(c->keytable->name, name) == 0)
format_add(ft, "client_prefix", "%d", 0);
else
format_add(ft, "client_prefix", "%d", 1);