diff options
-rw-r--r-- | inputfocus.c | 2 | ||||
-rw-r--r-- | settings.c | 1 | ||||
-rw-r--r-- | xxxterm.c | 12 | ||||
-rw-r--r-- | xxxterm.conf | 1 | ||||
-rw-r--r-- | xxxterm.h | 1 |
5 files changed, 15 insertions, 2 deletions
diff --git a/inputfocus.c b/inputfocus.c index fd3650f..6a280ff 100644 --- a/inputfocus.c +++ b/inputfocus.c @@ -209,8 +209,6 @@ input_check_mode(struct tab *t) if (dom_is_input(t, &active)) t->mode = XT_MODE_INSERT; - else - t->mode = XT_MODE_COMMAND; return (active); } diff --git a/settings.c b/settings.c index 2bf64b4..7109b5e 100644 --- a/settings.c +++ b/settings.c @@ -736,6 +736,7 @@ struct key_binding keys[] = { { "run_script", MOD1, 1, GDK_r }, { "proxy toggle", 0, 1, GDK_F2 }, { "editelement", CTRL, 1, GDK_i }, + { "passthrough", CTRL, 1, GDK_z }, /* search */ { "searchnext", 0, 0, GDK_n }, diff --git a/xxxterm.c b/xxxterm.c index 74eab2f..6870940 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -1036,6 +1036,13 @@ disable_hints(struct tab *t) } int +passthrough(struct tab *t, struct karg *args) +{ + t->mode = XT_MODE_PASSTHROUGH; + return (0); +} + +int hint(struct tab *t, struct karg *args) { @@ -2937,6 +2944,7 @@ struct cmd { { "togglesrc", 0, toggle_src, 0, 0 }, { "editsrc", 0, edit_src, 0, 0 }, { "editelement", 0, edit_element, 0, 0 }, + { "passthrough", 0, passthrough, 0, 0 }, /* yanking and pasting */ { "yankuri", 0, yank_uri, 0, 0 }, @@ -4970,6 +4978,10 @@ wv_keypress_cb(GtkEntry *w, GdkEventKey *e, struct tab *t) if (t->mode == XT_MODE_HINT) { /* XXX make sure cmd entry is enabled */ return (XT_CB_HANDLED); + } else if (t->mode == XT_MODE_PASSTHROUGH) { + if (CLEAN(e->state) == 0 && e->keyval == GDK_Escape) + t->mode = XT_MODE_COMMAND; + return (XT_CB_PASSTHROUGH); } else if (t->mode == XT_MODE_COMMAND) { /* prefix input */ snprintf(s, sizeof s, "%c", e->keyval); diff --git a/xxxterm.conf b/xxxterm.conf index c6cfe39..2657cc1 100644 --- a/xxxterm.conf +++ b/xxxterm.conf @@ -341,3 +341,4 @@ user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; en-us) Ap # keybinding = focusin,C-plus # keybinding = focusreset,C-0 # keybinding = editelement,!C-i +# keybinding = passthrough,C-z diff --git a/xxxterm.h b/xxxterm.h index 608a6cc..9057154 100644 --- a/xxxterm.h +++ b/xxxterm.h @@ -201,6 +201,7 @@ struct tab { #define XT_MODE_COMMAND (0) #define XT_MODE_INSERT (1) #define XT_MODE_HINT (2) +#define XT_MODE_PASSTHROUGH (3) int focus_wv; int ctrl_click; gchar *status; |