mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Merge pull request #2247 from spl237/keyboard
Add enter key to list of keyboard events detected.
This commit is contained in:
commit
0052383657
1 changed files with 3 additions and 1 deletions
|
@ -9,7 +9,8 @@ const KEY_NAME = {
|
|||
LEFT: 'left arrow',
|
||||
UP: 'up arrow',
|
||||
RIGHT: 'right arrow',
|
||||
DOWN: 'down arrow'
|
||||
DOWN: 'down arrow',
|
||||
ENTER: 'enter'
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -56,6 +57,7 @@ class Keyboard {
|
|||
case 'ArrowRight': return KEY_NAME.RIGHT;
|
||||
case 'Down':
|
||||
case 'ArrowDown': return KEY_NAME.DOWN;
|
||||
case 'Enter': return KEY_NAME.ENTER;
|
||||
}
|
||||
// Ignore modifier keys
|
||||
if (keyString.length > 1) {
|
||||
|
|
Loading…
Reference in a new issue