diff options
author | Andrew Dolgov <[email protected]> | 2009-10-09 13:13:57 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-10-09 13:13:57 +0400 |
commit | 78935092b540278e388749b7b0620fce62098fc9 (patch) | |
tree | ed0e120b57466ef3639f8df3329628263c715341 /tt-rss.js | |
parent | 449cc6062ed689345f3d5f2469ef3e71e4b01adc (diff) |
display active hotkey prefix on screen
Diffstat (limited to 'tt-rss.js')
-rw-r--r-- | tt-rss.js | 26 |
1 files changed, 7 insertions, 19 deletions
@@ -314,25 +314,6 @@ function viewfeed(feed, subop) { f.viewfeed(feed, subop); } -function hotkey_prefix_timeout() { - try { - - var date = new Date(); - var ts = Math.round(date.getTime() / 1000); - - if (hotkey_prefix_pressed && ts - hotkey_prefix_pressed >= 5) { - debug("hotkey_prefix seems to be stuck, aborting"); - hotkey_prefix_pressed = false; - hotkey_prefix = false; - } - - setTimeout("hotkey_prefix_timeout()", 10); - - } catch (e) { - exception_error("hotkey_prefix_timeout", e); - } -} - function timeout() { if (getInitParam("bw_limit") == "1") return; @@ -1060,6 +1041,7 @@ function hotkey_handler(e) { var keycode; var shift_key = false; + var cmdline = $('cmdline'); var feedlist = $('feedList'); try { @@ -1099,6 +1081,10 @@ function hotkey_handler(e) { hotkey_prefix = keycode; hotkey_prefix_pressed = ts; + + cmdline.innerHTML = keychar; + Element.show(cmdline); + debug("KP: PREFIX=" + keycode + " CHAR=" + keychar + " TS=" + ts); return true; } @@ -1109,6 +1095,8 @@ function hotkey_handler(e) { /* Global hotkeys */ + Element.hide(cmdline); + if (!hotkey_prefix) { if (keycode == 68 && shift_key) { // d |