mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 22:29:52 +08:00
fix(test): don't ignore caps lock in layout emulator (@fehmer) (#7107)
With layout emulation set to qwerty and caps-lock enabled keypresses are registered as lowercase.
This commit is contained in:
parent
0e4b9c4687
commit
e1e1bfb306
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ export async function getCharFromEvent(
|
|||
let isCapitalized = event.shiftKey;
|
||||
const altGrIndex = isAltGrPressed && keyVariants.length > 2 ? 2 : 0;
|
||||
const isNotPunctuation = !isPunctuationPattern.test(
|
||||
keyVariants.slice(altGrIndex, altGrIndex + 2).join()
|
||||
keyVariants.slice(altGrIndex, altGrIndex + 2).join("")
|
||||
);
|
||||
if (capsState && isNotPunctuation) {
|
||||
isCapitalized = !event.shiftKey;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue