Merge pull request #106 from holomorph/ctrl_leftbracket

add C-[ as a binding to leave command mode
This commit is contained in:
Daniel Micay 2013-07-15 09:40:38 -07:00
commit d6a8fcad1c
2 changed files with 7 additions and 1 deletions

View File

@ -78,7 +78,7 @@ COMMAND MODE
------------
+--------------------------+-----------------------------------------------------------+
| ``escape`` | deactivate command mode |
| ``escape`` or ``ctrl-[`` | deactivate command mode |
+--------------------------+-----------------------------------------------------------+
| ``x`` | activate url hints mode |
+--------------------------+-----------------------------------------------------------+

View File

@ -603,6 +603,12 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
if (info->select.mode != vi_mode::insert) {
if (modifiers == GDK_CONTROL_MASK) {
switch (gdk_keyval_to_lower(event->keyval)) {
case GDK_KEY_bracketleft:
exit_command_mode(info->panel.vte, &info->select);
gtk_widget_hide(info->panel.da);
gtk_widget_hide(info->panel.panel);
info->panel.url_list.clear();
break;
case GDK_KEY_v:
toggle_visual(vte, &info->select, vi_mode::visual_block);
break;