summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/main.js b/src/client/main.js
index e4b5b099..0c1b4c98 100644
--- a/src/client/main.js
+++ b/src/client/main.js
@@ -32,8 +32,9 @@ function(textanalysis_ui, textanalysis, buttons, history, drag_n_drop,
}
document.body.onkeyup = function(e) {
- var key = (e.key || (e.charCode && String.fromCharCode(e.charCode))
- || (e.which && String.fromCharCode(e.which))).toLowerCase();
+ var key = ((e.key && String(e.key))
+ || (e.charCode && String.fromCharCode(e.charCode))
+ || (e.which && String.fromCharCode(e.which))).toLowerCase();
if (e.altKey && e.ctrlKey && key == 'i') {
$('#textanalyser').focus();