From c7df8b5e9c89ef34b578d98d182be7af4cad02b3 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 15 May 2024 15:24:18 +0200 Subject: [PATCH] fix Keyboard & Mouse Shortcuts menu fixes #1996 --- src/main/menu.ts | 1 + src/renderer/src/App.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/menu.ts b/src/main/menu.ts index ca3abf7d..0b5a6815 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -15,6 +15,7 @@ const { Menu } = electron; export default ({ app, mainWindow, newVersion, isStoreBuild }: { app: Electron.App, mainWindow: BrowserWindow, newVersion?: string | undefined, isStoreBuild: boolean, }) => { + // todo TS mainWindow.webContents.send const menu: (MenuItemConstructorOptions | MenuItem)[] = [ ...(process.platform === 'darwin' ? [{ role: 'appMenu' as const }] : []), diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index e888737e..ec2e0bd4 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -2424,6 +2424,8 @@ function App() { key, async () => actionWithCatch(() => fn({ keyup: true })), ] as const), + // also called from menu: + ['toggleKeyboardShortcuts', async () => actionWithCatch(() => toggleKeyboardShortcuts())], ]; actionsWithCatch.forEach(([key, action]) => electron.ipcRenderer.on(key, action));