summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-25 14:31:52 +0100
committerAndrew Dolgov <[email protected]>2005-08-25 14:31:52 +0100
commit760966c15000eca3700d704b86999b4875f03eb9 (patch)
treea965b496afa60e232f98315b5c719c8e09d7bb69 /functions.js
parentc374a3fecab6e98544acc53e4bdaf034caf20caf (diff)
disable hotkey processing while searchbox is focused
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/functions.js b/functions.js
index 0b05ae2e8..f33b3970d 100644
--- a/functions.js
+++ b/functions.js
@@ -1,3 +1,13 @@
+var hotkeys_enabled = true;
+
+function disableHotkeys() {
+ hotkeys_enabled = false;
+}
+
+function enableHotkeys() {
+ hotkeys_enabled = true;
+}
+
function notify_callback() {
var container = document.getElementById('notify');
if (xmlhttp.readyState == 4) {
@@ -56,8 +66,11 @@ function printLockingError() {
var seq = "";
function hotkey_handler(e) {
+
var keycode;
+ if (!hotkeys_enabled) return;
+
if (window.event) {
keycode = window.event.keyCode;
} else if (e) {