-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
34 lines (32 loc) · 1.95 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
32
33
34
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
/**
* Insert the given text at the current cursor position.
*
* The whole text string is entered at once so it is performed quickly.
*
* ##### Arguments
* * `text` - Text to be inserted
* * `insertWithPaste` - An optional boolean that sets whether to insert text with the paste method.
* Default to false. (Setting true to use the paste method is useful to bypass
* some limitations in the default insert method. For example, the default
* insert method may not work for some apps, and in Mac, it doesn't work
* when certain key, such as Cmd, is pressed during insert.)
* * `arrowKeyToClickBeforeInsert` - An optional string that sets which arrow key to click before
* inserting text. Can be either "left" or "right". Default to None.
* * `pasteWaitTimeMs` - An optional number that sets how long to wait after performing the paste
* operation before restoring the previous clipboard state. Default to 30ms.
* `pasteWaitTimeMs` is only used when using the paste method, i.e. when
* `insertWithPaste` is set to true. (Beware of setting this value too low,
* as it may end up pasting the previous clipboard text/image)
*/
export function insertText(text: string, insertWithPaste?: boolean | undefined | null, arrowKeyToClickBeforeInsert?: string | undefined | null, pasteWaitTimeMs?: number | undefined | null): void
/**
* Simulate Ctrl+ V (Cmd + V in Mac) keyboard input to perform paste
*
* ##### Arguments
* * `arrowKeyToClickBeforePaste` - An optional string that sets which arrow key to click before
* pasting. Can be either "left" or "right". Default to None.
*/
export function paste(arrowKeyToClickBeforePaste?: string | undefined | null): void