mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-24 23:04:00 +08:00
parent
d7ff5f0f74
commit
623e280aa5
1 changed files with 7 additions and 1 deletions
|
@ -187,7 +187,13 @@ export async function getCharFromEvent(
|
|||
mapIndex = i;
|
||||
}
|
||||
}
|
||||
if (!mapIndex) return null;
|
||||
if (!mapIndex) {
|
||||
if (event.code.includes("Numpad")) {
|
||||
return event.key;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
const newKeyPreview = layoutMap[mapIndex][0];
|
||||
const shift = emulatedLayoutShouldShiftKey(event, newKeyPreview) ? 1 : 0;
|
||||
const char = layoutMap[mapIndex][shift];
|
||||
|
|
Loading…
Reference in a new issue