mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 04:11:47 +00:00
feat: run prettier
This commit is contained in:
@ -1,8 +1,16 @@
|
||||
// This is used for to control the songs
|
||||
import { BrowserWindow } from 'electron';
|
||||
|
||||
type Modifiers = (Electron.MouseInputEvent | Electron.MouseWheelInputEvent | Electron.KeyboardInputEvent)['modifiers'];
|
||||
export const pressKey = (window: BrowserWindow, key: string, modifiers: Modifiers = []) => {
|
||||
type Modifiers = (
|
||||
| Electron.MouseInputEvent
|
||||
| Electron.MouseWheelInputEvent
|
||||
| Electron.KeyboardInputEvent
|
||||
)['modifiers'];
|
||||
export const pressKey = (
|
||||
window: BrowserWindow,
|
||||
key: string,
|
||||
modifiers: Modifiers = [],
|
||||
) => {
|
||||
window.webContents.sendInputEvent({
|
||||
type: 'keyDown',
|
||||
modifiers,
|
||||
|
||||
Reference in New Issue
Block a user