diff --git a/src/electron/menu.ts b/src/electron/menu.ts index 1a312df26..61105ece0 100644 --- a/src/electron/menu.ts +++ b/src/electron/menu.ts @@ -135,15 +135,24 @@ export function createMenu(store: Store): void { }, { label: '&Delete', - accelerator: 'Backspace', + accelerator: (() => { + if (process.platform === 'darwin') { + return 'Backspace'; + } else { + return 'Delete'; + } + })(), click: () => { - console.log('delete'); const selectedElement: PageElement | undefined = store.getSelectedElement(); if (selectedElement) { selectedElement.remove(); store.setSelectedElement(undefined); } else { - Menu.sendActionToFirstResponder('Backspace'); + if (process.platform === 'darwin') { + Menu.sendActionToFirstResponder('Backspace'); + } else { + Menu.sendActionToFirstResponder('Delete'); + } } } }