From f29892b73fe3da14c4447af99ac57af6d7c37a1b Mon Sep 17 00:00:00 2001 From: Dhruv Yadav <dhruv1103@gmail.com> Date: Thu, 30 Aug 2018 21:36:36 +0530 Subject: [PATCH 1/3] Fixed addKeys(string) whitespace issue --- src/input/keyboard/KeyboardPlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/keyboard/KeyboardPlugin.js b/src/input/keyboard/KeyboardPlugin.js index 1d96677d2..4f2e8238b 100644 --- a/src/input/keyboard/KeyboardPlugin.js +++ b/src/input/keyboard/KeyboardPlugin.js @@ -344,7 +344,8 @@ var KeyboardPlugin = new Class({ for (var i = 0; i < keys.length; i++) { - output[keys[i]] = this.addKey(keys[i]); + var current_key = keys[i].trim(); + if (current_key) output[current_key] = this.addKey(current_key); } } else From 75319233f246a97b1d0c0c0eeb160e1ef77dc85d Mon Sep 17 00:00:00 2001 From: Dhruv Yadav <dhruv1103@gmail.com> Date: Thu, 30 Aug 2018 21:53:19 +0530 Subject: [PATCH 2/3] Styling updates for addKey(string) whitespace fix --- src/input/keyboard/KeyboardPlugin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/input/keyboard/KeyboardPlugin.js b/src/input/keyboard/KeyboardPlugin.js index 4f2e8238b..70ec6df6f 100644 --- a/src/input/keyboard/KeyboardPlugin.js +++ b/src/input/keyboard/KeyboardPlugin.js @@ -344,8 +344,11 @@ var KeyboardPlugin = new Class({ for (var i = 0; i < keys.length; i++) { - var current_key = keys[i].trim(); - if (current_key) output[current_key] = this.addKey(current_key); + var currentKey = keys[i].trim(); + if (currentKey) + { + output[currentKey] = this.addKey(currentKey); + } } } else From 0fd6d9d7dca2e530f8532eba370c74cde891c825 Mon Sep 17 00:00:00 2001 From: Dhruv Yadav <dhruv1103@gmail.com> Date: Thu, 30 Aug 2018 21:58:54 +0530 Subject: [PATCH 3/3] Fixed a trailing spaces issue from the addKey(string) whitespace update --- src/input/keyboard/KeyboardPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/keyboard/KeyboardPlugin.js b/src/input/keyboard/KeyboardPlugin.js index 70ec6df6f..d319864dd 100644 --- a/src/input/keyboard/KeyboardPlugin.js +++ b/src/input/keyboard/KeyboardPlugin.js @@ -345,7 +345,7 @@ var KeyboardPlugin = new Class({ for (var i = 0; i < keys.length; i++) { var currentKey = keys[i].trim(); - if (currentKey) + if (currentKey) { output[currentKey] = this.addKey(currentKey); }