From 229b92f72f717b6d78756854318c74e848a66703 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 7 May 2013 14:51:02 +0900 Subject: [PATCH] ctrl+0,1,2,3...9 for tab switching. --- README | 20 ++++---- man/terminology.1 | 2 +- src/bin/termio.c | 116 +++++++++++++++++++++++----------------------- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/README b/README index b0d6ddca..2598256b 100644 --- a/README +++ b/README @@ -66,16 +66,16 @@ Alt+Home = Enter command mode (enter commands to control terminology itself) Alt+Return = paste primary selection Ctrl+Shift+c = copy current selection to clipboard Ctrl+Shift+v = paste current clipboard selection -Alt+1 = switch to terminal tab 1 -Alt+2 = switch to terminal tab 2 -Alt+3 = switch to terminal tab 3 -Alt+4 = switch to terminal tab 4 -Alt+5 = switch to terminal tab 5 -Alt+6 = switch to terminal tab 6 -Alt+7 = switch to terminal tab 7 -Alt+8 = switch to terminal tab 8 -Alt+9 = switch to terminal tab 9 -Alt+0 = switch to terminal tab 10 +Ctrl+1 = switch to terminal tab 1 +Ctrl+2 = switch to terminal tab 2 +Ctrl+3 = switch to terminal tab 3 +Ctrl+4 = switch to terminal tab 4 +Ctrl+5 = switch to terminal tab 5 +Ctrl+6 = switch to terminal tab 6 +Ctrl+7 = switch to terminal tab 7 +Ctrl+8 = switch to terminal tab 8 +Ctrl+9 = switch to terminal tab 9 +Ctrl+0 = switch to terminal tab 10 Command mode commands currently understood: diff --git a/man/terminology.1 b/man/terminology.1 index e1a7e2de..343cda95 100644 --- a/man/terminology.1 +++ b/man/terminology.1 @@ -210,7 +210,7 @@ Copy current selection to clipboard. Paste current clipboard selection. . .TP -.B Alt+1 through Alt+0 +.B Ctrl+1 through Ctrl+0 Switch to terminal tab 1 through 10 .SH MOUSE CONTROLS diff --git a/src/bin/termio.c b/src/bin/termio.c index 4daf6304..3bd2fc83 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -1931,64 +1931,6 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, evas_object_smart_callback_call(data, "next", NULL); goto end; } - } - if ((!evas_key_modifier_is_set(ev->modifiers, "Alt")) && - (evas_key_modifier_is_set(ev->modifiers, "Control")) && - (evas_key_modifier_is_set(ev->modifiers, "Shift"))) - { - if (!strcmp(ev->keyname, "Prior")) - { - _compose_seq_reset(sd); - evas_object_smart_callback_call(data, "split,h", NULL); - goto end; - } - else if (!strcmp(ev->keyname, "Next")) - { - _compose_seq_reset(sd); - evas_object_smart_callback_call(data, "split,v", NULL); - goto end; - } - else if (!strcmp(ev->keyname, "t")) - { - _compose_seq_reset(sd); - evas_object_smart_callback_call(data, "new", NULL); - goto end; - } - else if (!strcmp(ev->keyname, "Home")) - { - _compose_seq_reset(sd); - evas_object_smart_callback_call(data, "select", NULL); - goto end; - } - else if (!strcmp(ev->keyname, "c")) - { - _compose_seq_reset(sd); - _take_selection(data, ELM_SEL_TYPE_CLIPBOARD); - goto end; - } - else if (!strcmp(ev->keyname, "v")) - { - _compose_seq_reset(sd); - _paste_selection(data, ELM_SEL_TYPE_CLIPBOARD); - goto end; - } - } - if ((evas_key_modifier_is_set(ev->modifiers, "Alt")) && - (!evas_key_modifier_is_set(ev->modifiers, "Shift")) && - (!evas_key_modifier_is_set(ev->modifiers, "Control"))) - { - if (!strcmp(ev->keyname, "Home")) - { - _compose_seq_reset(sd); - evas_object_smart_callback_call(data, "cmdbox", NULL); - goto end; - } - else if (!strcmp(ev->keyname, "Return")) - { - _compose_seq_reset(sd); - _paste_selection(data, ELM_SEL_TYPE_PRIMARY); - goto end; - } else if (!strcmp(ev->keyname, "1")) { _compose_seq_reset(sd); @@ -2050,6 +1992,64 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, goto end; } } + if ((!evas_key_modifier_is_set(ev->modifiers, "Alt")) && + (evas_key_modifier_is_set(ev->modifiers, "Control")) && + (evas_key_modifier_is_set(ev->modifiers, "Shift"))) + { + if (!strcmp(ev->keyname, "Prior")) + { + _compose_seq_reset(sd); + evas_object_smart_callback_call(data, "split,h", NULL); + goto end; + } + else if (!strcmp(ev->keyname, "Next")) + { + _compose_seq_reset(sd); + evas_object_smart_callback_call(data, "split,v", NULL); + goto end; + } + else if (!strcmp(ev->keyname, "t")) + { + _compose_seq_reset(sd); + evas_object_smart_callback_call(data, "new", NULL); + goto end; + } + else if (!strcmp(ev->keyname, "Home")) + { + _compose_seq_reset(sd); + evas_object_smart_callback_call(data, "select", NULL); + goto end; + } + else if (!strcmp(ev->keyname, "c")) + { + _compose_seq_reset(sd); + _take_selection(data, ELM_SEL_TYPE_CLIPBOARD); + goto end; + } + else if (!strcmp(ev->keyname, "v")) + { + _compose_seq_reset(sd); + _paste_selection(data, ELM_SEL_TYPE_CLIPBOARD); + goto end; + } + } + if ((evas_key_modifier_is_set(ev->modifiers, "Alt")) && + (!evas_key_modifier_is_set(ev->modifiers, "Shift")) && + (!evas_key_modifier_is_set(ev->modifiers, "Control"))) + { + if (!strcmp(ev->keyname, "Home")) + { + _compose_seq_reset(sd); + evas_object_smart_callback_call(data, "cmdbox", NULL); + goto end; + } + else if (!strcmp(ev->keyname, "Return")) + { + _compose_seq_reset(sd); + _paste_selection(data, ELM_SEL_TYPE_PRIMARY); + goto end; + } + } if ((evas_key_modifier_is_set(ev->modifiers, "Alt")) && (evas_key_modifier_is_set(ev->modifiers, "Control")) && (!evas_key_modifier_is_set(ev->modifiers, "Shift")))