fix Keyboard & Mouse Shortcuts menu

fixes #1996
pull/2038/head
Mikael Finstad 1 year ago
parent 8e361077a8
commit c7df8b5e9c
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -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 }] : []),

@ -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));

Loading…
Cancel
Save