diff --git a/packages/ui/src/composables/i18n-debug.ts b/packages/ui/src/composables/i18n-debug.ts index 384e14eb322..608f289ea1c 100644 --- a/packages/ui/src/composables/i18n-debug.ts +++ b/packages/ui/src/composables/i18n-debug.ts @@ -239,6 +239,14 @@ function setupKeyTooltip() { function registerKeyboardShortcuts(panelOpen: Ref, keyReveal: Ref) { useEventListener(document, 'keydown', (e: KeyboardEvent) => { + // Prevent the browser/app print dialog from opening with Ctrl+P / Cmd+P + if (e.ctrlKey || e.metaKey) { + if (e.code === 'KeyP') { + e.preventDefault() + return + } + } + // Use Cmd on macOS, Ctrl on other platforms const mod = e.metaKey || e.ctrlKey if (!mod || !e.shiftKey) return