fixed layout emulation causing undefined to be entered as text

This commit is contained in:
Jack 2021-09-30 13:46:34 +01:00
parent 7ef93b6f22
commit e5eec1220f

View file

@ -73,5 +73,9 @@ export function getCharFromEvent(event) {
const newKeyPreview = layoutMap[mapIndex][0];
const shift = emulatedLayoutShouldShiftKey(event, newKeyPreview) ? 1 : 0;
const char = layoutMap[mapIndex][shift];
return char;
if (char) {
return char;
} else {
return event.key;
}
}