.B Normal Mode
The default mode. Pressing Escape always enter normal mode.
.TP
-.B Insert Mode
+.B Input Mode
Used for editing text elements in a webpage.
.TP
.B Command Mode
Execute PROJECT commands from the builtin inputbox (commandline).
+
+.SS Submodes
.TP
.B Pass-Through Mode
In Pass-Through mode only the <ctrl-c> and <esc> keybindings are interpreted
to assign keybindings and much more. Also the keybindings are only shortcut
for the commands itself.
-Commands can be called in Insert Mode from the inputbox in the way like
+Commands can be called in Input Mode from the inputbox in the way like
":[count]command[ param[=value]]". But some commands are not available in
Command Mode and therefore not callable directly. To use them too, they must be
bound to the keybinding.
.BI "input [" TEXT "], in [" TEXT ]
Writes
.I TEXT
-into to inputbox and switch to command mode. If no
+into to inputbox and switch to Command Mode. If no
.I TEXT
is given, print ':' into the inputbox.
.TP
.TP
.B pass-through
-Switch PROJECT into pass-trough mode.
+Switch PROJECT into Pass-Through Mode.
.TP
.BI "shellcmd " CMD
.TP
.B focus-input
Set the cursor to the first found editable element on the page and switch
-PROJECT into insert mode.
+PROJECT into Input Mode.
.TP
.B source
Toggle between normal view and source view for the current page.
"25G" to got to 25% of the page.
.TP
.B esc
-Got back to normal mode indipendent from current mode.
+Got back to Normal Mode indipendent from current mode.
-.SS NORMAL_MODE
+.SS NORMAL MODE
.TP
.B g\-f
Toggle show html source of current page.
Opend the Web Inspector for current page.
.TP
.B g\-i
-Set cursor to the first editable element in the page and switch to insert
-mode.
+Set cursor to the first editable element in the page and switch to Input
+Mode.
.TP
.B :
-Start command mode and print `:' to the input box.
+Start Command Mode and print `:' to the input box.
.TP
.B /
-Start command mode and print `/' to inputbox to start searching forward.
+Start Command Mode and print `/' to inputbox to start searching forward.
.TP
.B ?
-Start command mode and print `?' to inputbox to start searching backward.
+Start Command Mode and print `?' to inputbox to start searching backward.
.TP
.B *
Search forward for current selected text.
Search backward for current selected text.
.TP
.B o
-Start command mode and print `:open ' to input box.
+Start Command Mode and print `:open ' to input box.
.TP
.B O
-Start command mode and print `:open CURRENT_URI' to input box.
+Start Command Mode and print `:open CURRENT_URI' to input box.
.TP
.B t
-Start command mode and print `:tabopen ' to input box.
+Start Command Mode and print `:tabopen ' to input box.
.TP
.B T
-Start command mode and print `:tabopen CURRENT_URI' to input box.
+Start Command Mode and print `:tabopen CURRENT_URI' to input box.
.TP
.B g\-h
Opend the configured home-page.
Search for \fIN\fPnth previous search result.
.TP
.B ctrl\-z
-Switch PROJECT into pass-through mode.
+Switch PROJECT into Pass-Through Mode.
-.SS COMMAND_MODE
+.SS COMMAND MODE
.TP
.B tab
Complete different sources in the inputbox or if hinting is active, focus next
.B down
Step through history forward.
-.SS INSERT_MODE
+.SS INPUT MODE
.TP
-.B ctrl-t
+.B ctrl\-t
If the current active form element is an inputbox or textarea, the content is
copied to temporary file and the file openen with the configured external
editor (setting `editor-command').
.TP
.B ctrl\-z
-Switch PROJECT into pass-through mode.
+Switch PROJECT into Pass-Through Mode.
.SH FILES
.I $XDG_CONFIG_HOME/PROJECT/config
{"scrollup", NULL, command_scroll, {VB_SCROLL_TYPE_SCROLL | VB_SCROLL_DIRECTION_TOP | VB_SCROLL_UNIT_LINE}},
{"scrolldown", NULL, command_scroll, {VB_SCROLL_TYPE_SCROLL | VB_SCROLL_DIRECTION_DOWN | VB_SCROLL_UNIT_LINE}},
{"nmap", NULL, command_map, {VB_MODE_NORMAL}},
- {"imap", NULL, command_map, {VB_MODE_INSERT}},
+ {"imap", NULL, command_map, {VB_MODE_INPUT}},
{"cmap", NULL, command_map, {VB_MODE_COMMAND}},
{"nunmap", NULL, command_unmap, {VB_MODE_NORMAL}},
- {"iunmap", NULL, command_unmap, {VB_MODE_INSERT}},
+ {"iunmap", NULL, command_unmap, {VB_MODE_INPUT}},
{"cunmap", NULL, command_unmap, {VB_MODE_COMMAND}},
{"set", NULL, command_set, {0}},
{"inspect", NULL, command_inspect, {0}},
gboolean command_focusinput(const Arg *arg)
{
if (dom_focus_input(vb.gui.webview)) {
- vb_set_mode(VB_MODE_INSERT, false);
+ vb_set_mode(VB_MODE_INPUT, false);
return true;
}
return false;
}
- html = webkit_dom_node_list_item(list, 0);
-
+ html = webkit_dom_node_list_item(list, 0);
resolver = webkit_dom_document_create_ns_resolver(doc, html);
if (!resolver) {
return false;
static gboolean auto_insert(Element *element)
{
if (dom_is_editable(element)) {
- vb_set_mode(VB_MODE_INSERT, false);
+ vb_set_mode(VB_MODE_INPUT, false);
return true;
}
return false;
webkit_dom_event_target_remove_event_listener(
WEBKIT_DOM_EVENT_TARGET(element), "focus", G_CALLBACK(editable_focus_cb), false
);
- if (CLEAN_MODE(vb.state.mode) != VB_MODE_INSERT) {
+ if (CLEAN_MODE(vb.state.mode) != VB_MODE_INPUT) {
EventTarget *target = webkit_dom_event_get_target(event);
auto_insert((void*)target);
}
} else if (!strncmp(value, "DONE:", 5)) {
vb_set_mode(VB_MODE_NORMAL, true);
} else if (!strncmp(value, "INSERT:", 7)) {
- vb_set_mode(VB_MODE_INSERT, false);
+ vb_set_mode(VB_MODE_INPUT, false);
if (HINTS_GET_TYPE(mode) == HINTS_TYPE_EDITABLE) {
command_editor(NULL);
}
command_search(&((Arg){VB_SEARCH_OFF}));
} else if ((vb.state.mode & VB_MODE_HINTING) && !(mode & VB_MODE_HINTING)) {
hints_clear();
- } else if (CLEAN_MODE(vb.state.mode) == VB_MODE_INSERT && !(mode & VB_MODE_INSERT)) {
+ } else if (CLEAN_MODE(vb.state.mode) == VB_MODE_INPUT && !(mode & VB_MODE_INPUT)) {
clean = true;
dom_clear_focus(vb.gui.webview);
}
gtk_widget_grab_focus(GTK_WIDGET(vb.gui.inputbox));
break;
- case VB_MODE_INSERT:
+ case VB_MODE_INPUT:
clean = false;
gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview));
if (mode & VB_MODE_PASSTHROUGH) {
run_user_script(frame);
}
- if (vb.state.mode & VB_MODE_INSERT) {
+ if (vb.state.mode & VB_MODE_INPUT) {
/* status bar is updated by vb_set_mode */
vb_set_mode(VB_MODE_NORMAL, false);
} else {
g_object_get(result, "context", &context, NULL);
if (mode == VB_MODE_NORMAL && context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) {
- vb_set_mode(VB_MODE_INSERT, false);
+ vb_set_mode(VB_MODE_INPUT, false);
propagate = true;
}
gtk_editable_set_position(GTK_EDITABLE(vb.gui.inputbox), -1); \
}
#define GET_URI() (webkit_web_view_get_uri(vb.gui.webview))
-#define CLEAN_MODE(mode) ((mode) & (VB_MODE_NORMAL|VB_MODE_COMMAND|VB_MODE_INSERT))
+#define CLEAN_MODE(mode) ((mode) & (VB_MODE_NORMAL|VB_MODE_COMMAND|VB_MODE_INPUT))
#define CLEAR_INPUT() (vb_echo(VB_MSG_NORMAL, ""))
#define PRIMARY_CLIPBOARD() gtk_clipboard_get(GDK_SELECTION_PRIMARY)
#define SECONDARY_CLIPBOARD() gtk_clipboard_get(GDK_NONE)
/* main modes */
VB_MODE_NORMAL = 1<<0,
VB_MODE_COMMAND = 1<<1,
- VB_MODE_INSERT = 1<<2,
+ VB_MODE_INPUT = 1<<2,
/* sub modes */
VB_MODE_PASSTHROUGH = 1<<3, /* normal or insert mode */
VB_MODE_SEARCH = 1<<4, /* normal mode */