summaryrefslogtreecommitdiff
path: root/core/input
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-09-06 17:22:40 +0200
committerPierre Ossman <ossman@cendio.se>2018-09-06 17:22:40 +0200
commit426a8c927bbea710b0429d75c4f3ab7b278c902d (patch)
tree8ab4754e71ce243f75930a1a172c48a00333315d /core/input
parent4a16dc51a8e514cd52aaba54cc6c863bf212e288 (diff)
downloadnovnc-426a8c927bbea710b0429d75c4f3ab7b278c902d.tar.gz
Enforce curly braces for control statements
Diffstat (limited to 'core/input')
-rw-r--r--core/input/keyboard.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/input/keyboard.js b/core/input/keyboard.js
index f8a6582..55ce917 100644
--- a/core/input/keyboard.js
+++ b/core/input/keyboard.js
@@ -249,10 +249,11 @@ export default class Keyboard {
// Character (A-Z)
let char = String.fromCharCode(e.keyCode);
// A feeble attempt at the correct case
- if (e.shiftKey)
+ if (e.shiftKey) {
char = char.toUpperCase();
- else
+ } else {
char = char.toLowerCase();
+ }
keysym = char.charCodeAt();
} else {
// Unknown, give up