Added CTRL-V to pass the next key without mapping.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 13 Oct 2013 15:52:50 +0000 (17:52 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 13 Oct 2013 15:52:50 +0000 (17:52 +0200)
doc/vimb.1
src/mode.c

index 46348ea..a0f6b43 100644 (file)
@@ -78,6 +78,9 @@ Toggle show html source of current page.
 .B g\-F
 Opend the Web Inspector for current page.
 .TP
+.B CTRL\-V
+Pass the next key press directly to gtk.
+.TP
 .B CTRL\-Q
 Quit the browser.
 
@@ -325,6 +328,9 @@ Moves the cursor direct behind the prompt `:'.
 .TP
 .B CTRL\-E
 Moves the cursor after the char in inputbox.
+.TP
+.B CTRL\-V
+Pass the next key press directly to gtk.
 
 .SS Command Line History
 .TP
@@ -508,6 +514,18 @@ value.
 Example:
 ":eval document.cookie"
 
+.SH INPUT MODE
+
+.TP
+.B <Esc>, CTRL\-[
+Switch back to normal mode.
+.TP
+.B CTRL\-T
+Open configured editor with content of current form field.
+.TP
+.B CTRL\-Z
+Enter the pass-through mode.
+
 .SH COMPLETIONS
 The completions are triggered by pressing `<Tab>` or `<shift-tab>` in the
 activated inputbox. Depending of the current inserted content different
index 4d9ef08..ebf2969 100644 (file)
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "main.h"
 #include "mode.h"
+#include "normal.h"
 
 static GHashTable *modes = NULL;
 extern VbCore vb;
@@ -95,6 +96,22 @@ void mode_enter(char id)
 VbResult mode_handle_key(int key)
 {
     VbResult res;
+    static gboolean ctrl_v = false;
+
+    if (ctrl_v) {
+        vb.state.processed_key = false;
+        ctrl_v = false;
+
+        return RESULT_COMPLETE;
+    }
+    if (key == CTRL('V')) {
+        vb.mode->flags |= FLAG_NOMAP;
+        ctrl_v = true;
+        normal_showcmd(key);
+
+        return RESULT_MORE;
+    }
+
     if (vb.mode && vb.mode->keypress) {
 #ifdef DEBUG
         int flags = vb.mode->flags;