mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-30 17:15:16 +01:00
refs #366 Add shortcut key to jump
This commit is contained in:
parent
1543e01f52
commit
aab9508bb5
@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
import { app, ipcMain, BrowserWindow, shell, Menu } from 'electron'
|
||||
import { app, ipcMain, BrowserWindow, shell, Menu, globalShortcut } from 'electron'
|
||||
import Datastore from 'nedb'
|
||||
import empty from 'is-empty'
|
||||
import log from 'electron-log'
|
||||
@ -238,6 +238,10 @@ function createWindow () {
|
||||
mainWindow.on('closed', () => {
|
||||
mainWindow = null
|
||||
})
|
||||
|
||||
globalShortcut.register('CommandOrControl+T', () => {
|
||||
mainWindow.webContents.send('CmdOrCtrl+T')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -128,10 +128,14 @@ const TimelineSpace = {
|
||||
ipcRenderer.on('CmdOrCtrl+K', () => {
|
||||
commit('TimelineSpace/Modals/Jump/changeModal', true, { root: true })
|
||||
})
|
||||
ipcRenderer.on('CmdOrCtrl+T', () => {
|
||||
commit('TimelineSpace/Modals/Jump/changeModal', true, { root: true })
|
||||
})
|
||||
},
|
||||
async removeShortcutEvents () {
|
||||
ipcRenderer.removeAllListeners('CmdOrCtrl+N')
|
||||
ipcRenderer.removeAllListeners('CmdOrCtrl+K')
|
||||
ipcRenderer.removeAllListeners('CmdOrCtrl+T')
|
||||
return 'removeShortcutEvents'
|
||||
},
|
||||
async clearAccount ({ commit }) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user