diff --git a/src/main/menus/app.js b/src/main/menus/app.js index 94dbe696..7e26e60f 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -100,6 +100,12 @@ function createTemplate(config) { }); const viewSubMenu = [{ + label: 'Find..', + accelerator: 'CmdOrCtrl+F', + click() { + WindowManager.sendToFind(); + }, + }, { label: 'Reload', accelerator: 'CmdOrCtrl+R', click() { diff --git a/src/main/windows/windowManager.js b/src/main/windows/windowManager.js index aad7133f..1423eaf4 100644 --- a/src/main/windows/windowManager.js +++ b/src/main/windows/windowManager.js @@ -381,6 +381,13 @@ export function reload() { } } +export function sendToFind() { + const currentView = status.viewManager.getCurrentView(); + if (currentView) { + currentView.view.webContents.sendInputEvent({type: 'keyDown', keyCode: 'F', modifiers: ['CmdOrCtrl', 'Shift']}); + } +} + export function handleHistory(event, offset) { if (status.viewManager) { const activeView = status.viewManager.getCurrentView();