1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

fix Keyboard & Mouse Shortcuts menu

fixes #1996
This commit is contained in:
Mikael Finstad 2024-05-15 15:24:18 +02:00
parent 8e361077a8
commit c7df8b5e9c
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
2 changed files with 3 additions and 0 deletions

View File

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

View File

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