fix(defineShortcuts): allow meta_- shortcut (#4321)

This commit is contained in:
Hugo Richard
2025-06-10 17:54:15 +02:00
committed by GitHub
parent 4b3dd48778
commit 4e7c1c9c30

View File

@@ -151,7 +151,7 @@ export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: Shor
// Parse key and modifiers
let shortcut: Partial<Shortcut>
if (key.includes('-') && key !== '-' && !key.match(chainedShortcutRegex)?.length) {
if (key.includes('-') && key !== '-' && !key.includes('_') && !key.match(chainedShortcutRegex)?.length) {
console.trace(`[Shortcut] Invalid key: "${key}"`)
}
@@ -159,7 +159,7 @@ export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: Shor
console.trace(`[Shortcut] Invalid key: "${key}"`)
}
const chained = key.includes('-') && key !== '-'
const chained = key.includes('-') && key !== '-' && !key.includes('_')
if (chained) {
shortcut = {
key: key.toLowerCase(),