Detect arrow keys on Windows Edge

This commit is contained in:
Eric Rosenbaum committed 2018-04-30 17:06:23 -04:00
1 parent 64869e5a87
commit fbeaec600c
1 file changed
+6 -2
+6 -2
View File
@@ -44,9 +44,13 @@ class Keyboard {
// Convert space and arrow keys to their Scratch key names.
switch (keyString) {
case ' ': return 'space';
case 'ArrowLeft': return 'left arrow';
case 'ArrowUp': return 'up arrow';
case 'ArrowLeft':
case 'Left': return 'left arrow';
case 'ArrowUp':
case 'Up': return 'up arrow';
case 'Right':
case 'ArrowRight': return 'right arrow';
case 'Down':
case 'ArrowDown': return 'down arrow';
}
// Ignore modifier keys