From 4e7c1c9c305b45dd76d4c238e70a6aeedae78c8b Mon Sep 17 00:00:00 2001 From: Hugo Richard Date: Tue, 10 Jun 2025 17:54:15 +0200 Subject: [PATCH] fix(defineShortcuts): allow `meta_-` shortcut (#4321) --- src/runtime/composables/defineShortcuts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/composables/defineShortcuts.ts b/src/runtime/composables/defineShortcuts.ts index 6042c266..57e53d27 100644 --- a/src/runtime/composables/defineShortcuts.ts +++ b/src/runtime/composables/defineShortcuts.ts @@ -151,7 +151,7 @@ export function defineShortcuts(config: MaybeRef, options: Shor // Parse key and modifiers let shortcut: Partial - 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, 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(),