From 78935092b540278e388749b7b0620fce62098fc9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 9 Oct 2009 13:13:57 +0400 Subject: display active hotkey prefix on screen --- functions.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'functions.js') 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); + } +} + + -- cgit v1.2.3-54-g00ecf