aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Cholewiński <harry666t@gmail.com>2015-12-30 12:54:54 +0100
committerKamil Cholewiński <harry666t@gmail.com>2015-12-30 12:54:54 +0100
commit75158078ff56dee532e2c899ef9a3b027e180e82 (patch)
treeae056e41d7de019c7a4248868ad7ed8291722ca1
parent8562080e4fdb73eb4767b8568f3e02fe9497b83b (diff)
downloadmpw-75158078ff56dee532e2c899ef9a3b027e180e82.zip
mpw-75158078ff56dee532e2c899ef9a3b027e180e82.tar.gz
mpw-75158078ff56dee532e2c899ef9a3b027e180e82.tar.bz2
Apparently some browsers don't set event.key
-rw-r--r--static/keyboard.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/static/keyboard.js b/static/keyboard.js
index a01ccc4..2ab0e74 100644
--- a/static/keyboard.js
+++ b/static/keyboard.js
@@ -63,6 +63,9 @@ function key_go(event) {
$(document).ready(function() {
handle_state = key_main;
$(document).keydown(function (event) {
+ if (event.key === undefined) {
+ event.key = String.fromCharCode(event.keyCode + 32);
+ }
handle_state(event);
});
});