mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 23:36:37 +08:00
fixed layout emulation causing undefined to be entered as text
This commit is contained in:
parent
7ef93b6f22
commit
e5eec1220f
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue