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:
Christian Fehmer 2025-11-14 13:41:07 +01:00 committed by GitHub
parent 0e4b9c4687
commit e1e1bfb306
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;