From eb166e69e3b382bab514dff20be2981ad4d2e2f8 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Wed, 16 Dec 2020 08:49:29 -0500 Subject: [PATCH] Address layout key handling. Fixes #842 --- src/lib/services/PhysicalKeyboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/services/PhysicalKeyboard.js b/src/lib/services/PhysicalKeyboard.js index 75c9adc7..6bbc57e5 100644 --- a/src/lib/services/PhysicalKeyboard.js +++ b/src/lib/services/PhysicalKeyboard.js @@ -99,15 +99,15 @@ class PhysicalKeyboard { } /** - * If button is not uppercase, casting to lowercase + * Casting key to lowercase */ if ( - output !== output.toUpperCase() || + (output && output !== output.toUpperCase()) || (event.code[0] === "F" && Number.isInteger(Number(event.code[1])) && event.code.length <= 3) ) { - output = output.toLowerCase(); + output = output ? output.toLowerCase() : output; } return output;