.TP
.B Command Mode
Execute PROJECT commands from the builtin inputbox (commandline).
+.TP
+.B Pass-Through Mode
+In Pass-Through mode only the <ctrl-c> and <esc> keybindings are interpreted
+by PROJECT, all other keystrokes are given to the webview to handle them. This
+allows to use websites that uses keybindings itself, that might be swallowed
+by PROJECT else.
.SH COMMANDS
Commands are a central part in PROJECT. They are used for nearly all things
Example:
":run set input-bg-normal=#ff0 | set input-fg-normal=#f0f | 5pagedown"
+
+.TP
+.B pass-through
+Switch PROJECT into pass-trough mode.
+
.TP
.BI "shellcmd " CMD
Runs given shell \fICMD\fP syncron and print the output into inputbox. The
.TP
.BI [ N ]N
Search for \fIN\fPnth previous search result.
+.TP
+.B ctrl-z
+Switch PROJECT into pass-through mode.
.SS COMMAND_MODE
.TP
{"queue-pop", NULL, command_queue, {COMMAND_QUEUE_POP}},
{"queue-clear", NULL, command_queue, {COMMAND_QUEUE_CLEAR}},
#endif
+ {"pass-through", NULL, command_mode, {VB_MODE_PASSTHROUGH}},
};
static void editor_resume(GPid pid, int status, OpenEditorData *data);
}
#endif
+gboolean command_mode(const Arg *arg)
+{
+ return vb_set_mode(arg->i, false);
+}
+
gboolean command_editor(const Arg *arg)
{
char *file_path = NULL;
#ifdef FEATURE_QUEUE
gboolean command_queue(const Arg *arg);
#endif
+gboolean command_mode(const Arg *arg);
#endif /* end of include guard: _COMMAND_H */
"nmap zz=zoomreset",
"nmap gu=descent",
"nmap gU=descent!",
+ "nmap <ctrl-z>=pass-through",
"cmap <tab>=next",
"cmap <shift-tab>=prev",
"cmap <up>=hist-prev",
return true;
}
+ /* skip further logic if we are in pass through mode */
+ if (vb.state.mode & VB_MODE_PASSTHROUGH) {
+ return true;
+ }
+
/* allow mode keys and counts only in normal mode and search mode */
if (vb.state.mode & (VB_MODE_NORMAL|VB_MODE_SEARCH)) {
if (vb.state.modkey == 0 && ((keyval >= GDK_1 && keyval <= GDK_9)
gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview));
vb_echo(VB_MSG_NORMAL, false, "-- INPUT --");
break;
+
+ case VB_MODE_PASSTHROUGH:
+ clean = false;
+ gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview));
+ vb_echo(VB_MSG_NORMAL, false, "-- PASS THROUGH --");
+ break;
}
vb.state.mode = mode;
}
VB_MODE_NORMAL = 1<<0,
VB_MODE_COMMAND = 1<<1,
VB_MODE_INSERT = 1<<2,
+ VB_MODE_PASSTHROUGH = 1<<3,
/* sub modes */
- VB_MODE_SEARCH = 1<<3, /* normal mode */
- VB_MODE_COMPLETE = 1<<4, /* command mode */
- VB_MODE_HINTING = 1<<5, /* command mode */
+ VB_MODE_SEARCH = 1<<4, /* normal mode */
+ VB_MODE_COMPLETE = 1<<5, /* command mode */
+ VB_MODE_HINTING = 1<<6, /* command mode */
} Mode;
typedef enum {