From 39cf9c9d31954198ad73e2b6721a92fe782ee56c Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 12 Dec 2015 18:19:00 +0000 Subject: Allow prefix and prefix2 to be set to None to disable (useful if you would rather bind the prefix in the root table). --- cmd-set-option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index 7de91aa2..e2a4768c 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -396,7 +396,8 @@ cmd_set_option_key(__unused struct cmd *self, struct cmd_q *cmdq, { key_code key; - if ((key = key_string_lookup_string(value)) == KEYC_NONE) { + key = key_string_lookup_string(value); + if (key == KEYC_UNKNOWN) { cmdq_error(cmdq, "bad key: %s", value); return (NULL); } -- cgit From 5ed17e84faed0a7655ec1eb3de291b60839dcb12 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 12 Dec 2015 18:32:24 +0000 Subject: 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. --- cmd-set-option.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index e2a4768c..daee62ac 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -183,6 +183,10 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) w->active->flags |= PANE_CHANGED; } } + if (strcmp(oe->name, "key-table") == 0) { + TAILQ_FOREACH(c, &clients, entry) + server_client_set_key_table(c, NULL); + } if (strcmp(oe->name, "status") == 0 || strcmp(oe->name, "status-interval") == 0) status_timer_start_all(); -- cgit