ctrl+0,1,2,3...9 for tab switching.

devs/lucas/wip
Carsten Haitzler 10 years ago
parent cc5b3942fa
commit 229b92f72f
  1. 20
      README
  2. 2
      man/terminology.1
  3. 92
      src/bin/termio.c

@ -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:

@ -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

@ -1931,122 +1931,122 @@ _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"))
else if (!strcmp(ev->keyname, "1"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "split,h", NULL);
evas_object_smart_callback_call(data, "tab,1", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "Next"))
else if (!strcmp(ev->keyname, "2"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "split,v", NULL);
evas_object_smart_callback_call(data, "tab,2", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "t"))
else if (!strcmp(ev->keyname, "3"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "new", NULL);
evas_object_smart_callback_call(data, "tab,3", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "Home"))
else if (!strcmp(ev->keyname, "4"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "select", NULL);
evas_object_smart_callback_call(data, "tab,4", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "c"))
else if (!strcmp(ev->keyname, "5"))
{
_compose_seq_reset(sd);
_take_selection(data, ELM_SEL_TYPE_CLIPBOARD);
evas_object_smart_callback_call(data, "tab,5", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "v"))
else if (!strcmp(ev->keyname, "6"))
{
_compose_seq_reset(sd);
_paste_selection(data, ELM_SEL_TYPE_CLIPBOARD);
evas_object_smart_callback_call(data, "tab,6", NULL);
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"))
else if (!strcmp(ev->keyname, "7"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "cmdbox", NULL);
evas_object_smart_callback_call(data, "tab,7", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "Return"))
else if (!strcmp(ev->keyname, "8"))
{
_compose_seq_reset(sd);
_paste_selection(data, ELM_SEL_TYPE_PRIMARY);
evas_object_smart_callback_call(data, "tab,8", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "1"))
else if (!strcmp(ev->keyname, "9"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,1", NULL);
evas_object_smart_callback_call(data, "tab,9", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "2"))
else if (!strcmp(ev->keyname, "0"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,2", NULL);
evas_object_smart_callback_call(data, "tab,0", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "3"))
}
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, "tab,3", NULL);
evas_object_smart_callback_call(data, "split,h", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "4"))
else if (!strcmp(ev->keyname, "Next"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,4", NULL);
evas_object_smart_callback_call(data, "split,v", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "5"))
else if (!strcmp(ev->keyname, "t"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,5", NULL);
evas_object_smart_callback_call(data, "new", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "6"))
else if (!strcmp(ev->keyname, "Home"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,6", NULL);
evas_object_smart_callback_call(data, "select", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "7"))
else if (!strcmp(ev->keyname, "c"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,7", NULL);
_take_selection(data, ELM_SEL_TYPE_CLIPBOARD);
goto end;
}
else if (!strcmp(ev->keyname, "8"))
else if (!strcmp(ev->keyname, "v"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,8", NULL);
_paste_selection(data, ELM_SEL_TYPE_CLIPBOARD);
goto end;
}
else if (!strcmp(ev->keyname, "9"))
}
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, "tab,9", NULL);
evas_object_smart_callback_call(data, "cmdbox", NULL);
goto end;
}
else if (!strcmp(ev->keyname, "0"))
else if (!strcmp(ev->keyname, "Return"))
{
_compose_seq_reset(sd);
evas_object_smart_callback_call(data, "tab,0", NULL);
_paste_selection(data, ELM_SEL_TYPE_PRIMARY);
goto end;
}
}

Loading…
Cancel
Save