2
0

hotkeys: only match just() when no modifiers are held (#35535)

This commit is contained in:
william light
2025-07-26 07:51:50 +02:00
committed by GitHub
parent e93efe0e13
commit f3786e0816

View File

@@ -40,7 +40,11 @@ type KeyMatcher = (
*/ */
function just(keyName: string): KeyMatcher { function just(keyName: string): KeyMatcher {
return (event) => ({ return (event) => ({
isMatch: normalizeKey(event.key) === keyName, isMatch:
normalizeKey(event.key) === keyName &&
!event.altKey &&
!event.ctrlKey &&
!event.metaKey,
priority: hotkeyPriority.singleKey, priority: hotkeyPriority.singleKey,
}); });
} }