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