mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-11-24 07:30:15 +01:00
14 lines
329 B
JavaScript
14 lines
329 B
JavaScript
import { globalShortcut } from 'electron'
|
|
|
|
export default (mainWindow) => {
|
|
mainWindow.on('focus', () => {
|
|
globalShortcut.register('CommandOrControl+F', (event) => {
|
|
mainWindow.webContents.send('focus-on-search')
|
|
})
|
|
})
|
|
|
|
mainWindow.on('blur', () => {
|
|
globalShortcut.unregister('CommandOrControl+F')
|
|
})
|
|
}
|