diff options
-rw-r--r-- | themes/_global/js/keyboard.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/_global/js/keyboard.js b/themes/_global/js/keyboard.js index ec20d3f2..d2a736e4 100644 --- a/themes/_global/js/keyboard.js +++ b/themes/_global/js/keyboard.js | |||
@@ -1,5 +1,5 @@ | |||
1 | function navigateKeyboard(leftURL, rightURL) { | 1 | function navigateKeyboard(leftURL, rightURL) { |
2 | window.addEventListener("keypress", function (event) { | 2 | window.addEventListener("keydown", function (event) { |
3 | var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions | 3 | var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions |
4 | switch (key) { | 4 | switch (key) { |
5 | case 37: | 5 | case 37: |
@@ -24,4 +24,4 @@ function goRight(rightURL) { | |||
24 | if (rightURL != "?view=view&id=") { | 24 | if (rightURL != "?view=view&id=") { |
25 | window.location = window.location.origin + window.location.pathname + rightURL; | 25 | window.location = window.location.origin + window.location.pathname + rightURL; |
26 | } | 26 | } |
27 | } \ No newline at end of file | 27 | } |