diff options
author | Josh Rickmar <jrick@devio.us> | 2012-07-18 10:26:40 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-07-18 10:26:40 -0400 |
commit | 7c694ce02533297abe0a345fc0b8a1d588bb2cd1 (patch) | |
tree | bf1734253d61d70b403412e34af686f2a16919bc | |
parent | b3dee20351a2a2735a72a67f334b907e45782b0d (diff) | |
download | xombrero-7c694ce02533297abe0a345fc0b8a1d588bb2cd1.tar.gz |
Modify the keybindings in the example config so they match the same as
the keys[] structure in settings.c. Before, they were missing all the !'s to set the use_in_entry flag in struct key_binding. Also, change the behavior of command_mode to find the current active element and blur that instead of t->active (which was the "page's default" entry, set from javascript).
-rw-r--r-- | inputfocus.c | 17 | ||||
-rw-r--r-- | xombrero.conf | 102 |
2 files changed, 60 insertions, 59 deletions
diff --git a/inputfocus.c b/inputfocus.c index 951782d..173e6d6 100644 --- a/inputfocus.c +++ b/inputfocus.c @@ -280,17 +280,18 @@ input_check_mode(struct tab *t) int command_mode(struct tab *t, struct karg *args) { - char *text = NULL; + WebKitDOMDocument *doc; + WebKitDOMElement *a; if (args->i == XT_MODE_COMMAND) { - if (dom_is_input(t, &text)) - if (t->active) - webkit_dom_element_blur(t->active); + doc = webkit_web_view_get_dom_document(t->wv); + a = webkit_dom_html_document_get_active_element( + (WebKitDOMHTMLDocument *)doc); + if (a) + webkit_dom_element_blur(a); t->mode = XT_MODE_COMMAND; - } else { - if (focus_input(t)) - t->mode = XT_MODE_INSERT; - } + } else if (focus_input(t)) + t->mode = XT_MODE_INSERT; return (XT_CB_HANDLED); } diff --git a/xombrero.conf b/xombrero.conf index e3c03e0..e454607 100644 --- a/xombrero.conf +++ b/xombrero.conf @@ -290,28 +290,28 @@ # keybinding = command,colon # keybinding = search,slash # keybinding = searchb,question -# keybinding = command_mode,Escape +# keybinding = command_mode,!Escape # keybinding = insert_mode,i -# keybinding = cookiejar,M1-j -# keybinding = downloadmgr,M1-d -# keybinding = history,M1-h -# keybinding = print,C-p -# keybinding = quitall,C-q -# keybinding = restart,M1-q -# keybinding = run_script,M1-r -# keybinding = js toggle,C-j -# keybinding = cookie toggle,M1-c -# keybinding = togglesrc,C-s +# keybinding = cookiejar,!M1-j +# keybinding = downloadmgr,!M1-d +# keybinding = history,!M1-h +# keybinding = print,!C-p +# keybinding = quitall,!C-q +# keybinding = restart,!M1-q +# keybinding = run_script,!M1-r +# keybinding = js toggle,!C-j +# keybinding = cookie toggle,!M1-c +# keybinding = togglesrc,!C-s # keybinding = yankuri,y # keybinding = pasteuricur,p # keybinding = pasteurinew,P -# keybinding = toplevel toggle,F4 -# keybinding = help,F1 -# keybinding = proxy toggle,F2 +# keybinding = toplevel toggle,!F4 +# keybinding = help,!F1 +# keybinding = proxy toggle,!F2 # keybinding = searchnext,n # keybinding = searchprevious,N -# keybinding = focusaddress,F6 -# keybinding = focussearch,F7 +# keybinding = focusaddress,!F6 +# keybinding = focussearch,!F7 # keybinding = hinting,f # keybinding = hinting,period # keybinding = hinting_newtab,S-F @@ -319,12 +319,12 @@ # keybinding = userstyle,s # keybinding = userstyle_global,S # keybinding = goback,BackSpace -# keybinding = goback,M1-Left -# keybinding = goforward,S-BackSpace -# keybinding = goforward,M1-Right -# keybinding = reload,F5 -# keybinding = reload,C-r -# keybinding = reload,C-l +# keybinding = goback,!M1-Left +# keybinding = goforward,!S-BackSpace +# keybinding = goforward,!M1-Right +# keybinding = reload,!F5 +# keybinding = reload,!C-r +# keybinding = reload,!C-l # keybinding = favorites,!M1-f # keybinding = scrolldown,j # keybinding = scrolldown,Down @@ -334,46 +334,46 @@ # keybinding = scrollbottom,End # keybinding = scrolltop,Home # keybinding = scrollpagedown,space -# keybinding = scrollpagedown,C-f +# keybinding = scrollpagedown,!C-f # keybinding = scrollpagedown,Page_Down -# keybinding = scrollhalfdown,C-d +# keybinding = scrollhalfdown,!C-d # keybinding = scrollpageup,Page_Up -# keybinding = scrollpageup,C-b -# keybinding = scrollhalfup,C-u +# keybinding = scrollpageup,!C-b +# keybinding = scrollhalfup,!C-u # keybinding = scrollright,l # keybinding = scrollright,Right # keybinding = scrollfarright,dollar # keybinding = scrollleft,h # keybinding = scrollleft,Left # keybinding = scrollfarleft,0 -# keybinding = statustoggle,C-n -# keybinding = stop,S-F5 -# keybinding = tabnew,C-t +# keybinding = statustoggle,!C-n +# keybinding = stop,!S-F5 +# keybinding = tabnew,!C-t # keybinding = tabclose,!C-w # keybinding = tabundoclose,U -# keybinding = tabnext 1,C-1 -# keybinding = tabnext 2,C-2 -# keybinding = tabnext 3,C-3 -# keybinding = tabnext 4,C-4 -# keybinding = tabnext 5,C-5 -# keybinding = tabnext 6,C-6 -# keybinding = tabnext 7,C-7 -# keybinding = tabnext 8,C-8 -# keybinding = tabnext 9,C-9 -# keybinding = tabfirst,C-less -# keybinding = tablast,C-greater -# keybinding = tabprevious,C-Left -# keybinding = tabnext,C-Right -# keybinding = focusout,C-minus -# keybinding = focusin,C-equal -# keybinding = focusin,C-plus -# keybinding = focusreset,C-0 +# keybinding = tabnext 1,!C-1 +# keybinding = tabnext 2,!C-2 +# keybinding = tabnext 3,!C-3 +# keybinding = tabnext 4,!C-4 +# keybinding = tabnext 5,!C-5 +# keybinding = tabnext 6,!C-6 +# keybinding = tabnext 7,!C-7 +# keybinding = tabnext 8,!C-8 +# keybinding = tabnext 9,!C-9 +# keybinding = tabfirst,!C-less +# keybinding = tablast,!C-greater +# keybinding = tabprevious,!C-Left +# keybinding = tabnext,!C-Right +# keybinding = focusout,!C-minus +# keybinding = focusin,!C-equal +# keybinding = focusin,!C-plus +# keybinding = focusreset,!C-0 # keybinding = editelement,!C-i -# keybinding = passthrough,C-z -# keybinding = :open ,F9 -# keybinding = :open <uri>,F10 -# keybinding = :tabnew ,F11 -# keybinding = :tabnew <uri>,F12 +# keybinding = passthrough,!C-z +# keybinding = :open ,!F9 +# keybinding = :open <uri>,!F10 +# keybinding = :tabnew ,!F11 +# keybinding = :tabnew <uri>,!F12 # parse the contents of another configuration file # include_config = ~/.xombrero_alternate.conf |