forked from octalmage/robotjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
31 lines (28 loc) · 1.24 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export interface Bitmap {
width: number
height: number
image: any
byteWidth: number
bitsPerPixel: number
bytesPerPixel: number
colorAt(x: number, y: number): string
}
export interface Screen {
capture(x?: number, y?: number, width?: number, height?: number): Bitmap
}
export function setKeyboardDelay(ms: number) : void
export function keyTap(key: string, modifier?: string | string[]) : void
export function keyToggle(key: string, down: string, modifier?: string | string[]) : void
export function typeString(string: string) : void
export function typeStringDelayed(string: string, cpm: number) : void
export function setMouseDelay(delay: number) : void
export function moveMouse(x: number, y: number) : void
export function moveMouseSmooth(x: number, y: number) : void
export function mouseClick(button?: string, double?: boolean) : void
export function mouseToggle(down?: string, button?: boolean) : void
export function dragMouse(x: number, y: number) : void
export function scrollMouse(magnitude: number, direction: string) : void
export function getMousePos(): { x: number, y: number }
export function getPixelColor(x: number, y: number): string
export function getScreenSize(): { width: number, height: number }
export var screen: Screen