diff options
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/functions.js b/functions.js index 1e28f1392..6ab23b0f2 100644 --- a/functions.js +++ b/functions.js @@ -2169,3 +2169,25 @@ function html5AudioOrFlash(type) { } } } */ + +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; + Element.hide('cmdline'); + } + + setTimeout("hotkey_prefix_timeout()", 1000); + + } catch (e) { + exception_error("hotkey_prefix_timeout", e); + } +} + + |