From 7783deecf66453b353636d3dffd52bfd17222c12 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Wed, 31 Jul 2019 07:23:35 +0100 Subject: [PATCH] Add enter key to list of keyboard events detected. --- src/io/keyboard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/io/keyboard.js b/src/io/keyboard.js index b1183c5f4..ee1be87a6 100644 --- a/src/io/keyboard.js +++ b/src/io/keyboard.js @@ -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) {