Skip to content

The swiss army knife of lossless video/audio editing

fix Keyboard & Mouse Shortcuts menu

Mikael Finstadc7df8b5e9c89
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));