summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-10-09 13:13:57 +0400
committerAndrew Dolgov <[email protected]>2009-10-09 13:13:57 +0400
commit78935092b540278e388749b7b0620fce62098fc9 (patch)
treeed0e120b57466ef3639f8df3329628263c715341 /functions.js
parent449cc6062ed689345f3d5f2469ef3e71e4b01adc (diff)
display active hotkey prefix on screen
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js22
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);
+ }
+}
+
+