mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-21 03:45:58 +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')
|
||
|
})
|
||
|
}
|