Skip to content

Commit

Permalink
Merge pull request getcursor#213 from raymond-ley/feature-#104
Browse files Browse the repository at this point in the history
Add shortcut keys for minimizing and maximizing mentioned in getcursor#104
  • Loading branch information
truell20 authored Mar 25, 2023
2 parents fd7999f + 61852c2 commit 1c04c4a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@ const createWindow = () => {
var menu = Menu.buildFromTemplate(menuList)
Menu.setApplicationMenu(menu)

globalShortcut.register('CommandOrControl+M', () => {
main_window.minimize()
})

globalShortcut.register('CommandOrControl+Shift+M', () => {
if (main_window.isMaximized()) {
main_window.restore();
} else {
main_window.maximize()
}
})

ipcMain.handle('changeSettings', (event: Event, settings: Settings) => {
log.info('STORING SETTINGS')
log.info(settings)
Expand Down

0 comments on commit 1c04c4a

Please sign in to comment.