From fb0c4af780b66c41a4682c97e719e264a5e6a33e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 29 Jan 2019 23:21:34 +0000 Subject: [PATCH] Trim the keycodes --- src/input/keyboard/KeyboardManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/keyboard/KeyboardManager.js b/src/input/keyboard/KeyboardManager.js index 191f3d5de..9102d5e8b 100644 --- a/src/input/keyboard/KeyboardManager.js +++ b/src/input/keyboard/KeyboardManager.js @@ -329,7 +329,7 @@ var KeyboardManager = new Class({ if (typeof code === 'string') { - code = KeyCodes[code.toUpperCase()]; + code = KeyCodes[code.trim().toUpperCase()]; } if (captures.indexOf(code) === -1)