diff --git a/index.html b/index.html index 4133206..332cded 100644 --- a/index.html +++ b/index.html @@ -261,17 +261,18 @@ function parse_links(s) { linkList=links.slice(0); init(); } -function move_cursor(ev) { +function keyboard_entry(ev) { var kC=ev.keyCode; var k=String.fromCharCode(ev.keyCode); - /*if (/[0-9]/.test(k) ) { - var ki=parseInt(k); if (ki==0) { ki=10; } - open_link(hitList[ki-1]); - return - }*/ + if ( document.activeElement === document.getElementById("filter")) { + return + } if (/S/.test(k)) { document.getElementById("filter").focus(); } + if (/N/.test(k)) { + toggle_blank(); + } } function toggle_blank() { var span=document.getElementById('open_blank_span'); @@ -318,7 +319,7 @@ function get_cookie(name) { } return null } -document.onkeyup=move_cursor; +document.onkeyup=keyboard_entry; document.onscroll=scroll_save; var linkReg=/([^\[]*)\[([^\]]+)\]\(([^\)]+)\)(.*)/; var linkPlain=/(.*)(http[^\s]+)(.*)/; @@ -340,9 +341,9 @@ var config = {