diff --git a/src/main/libs/ShortcutRegister.ts b/src/main/libs/ShortcutRegister.ts index 632eafc8..f0a2238e 100644 --- a/src/main/libs/ShortcutRegister.ts +++ b/src/main/libs/ShortcutRegister.ts @@ -75,7 +75,7 @@ export class ShortcutRegister { for (const key of shortcut.keys) { try { this._menu.append(new MenuItem({ - label: 'Shortcuts', + label: '.', visible: false, submenu: [{ label: String(key), diff --git a/src/main/main.ts b/src/main/main.ts index 9757b4d0..90ffbe49 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -52,7 +52,6 @@ async function createMainWindow () { trafficLightPosition: isMacOS ? { x: 10, y: 8 } : undefined, backgroundColor: '#1d1d1d' }); - window.removeMenu(); mainWindowState.manage(window); window.on('moved', saveWindowState); diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 0ee88ed3..3d3b720f 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -130,6 +130,12 @@ onMounted(() => { node = node.parentNode; } }); + + document.addEventListener('keydown', e => { + if (e.altKey && e.key === 'Alt') { // Prevent Alt key to trigger hidden shortcut menu + e.preventDefault(); + } + }); });