@@ -58,6 +58,16 @@ export class NativeAdapter {
5858 this . mouse . setMouseDelay ( delay ) ;
5959 }
6060
61+ /**
62+ * setKeyboardDelay configures keyboard delay between key presses
63+ *
64+ * @param {number } delay The delay
65+ * @memberof NativeAdapter
66+ */
67+ public setKeyboardDelay ( delay : number ) : void {
68+ this . keyboard . setKeyboardDelay ( delay ) ;
69+ }
70+
6171 /**
6272 * setMousePosition changes the current mouse cursor position to a given point
6373 *
@@ -71,10 +81,10 @@ export class NativeAdapter {
7181 /**
7282 * getMousePosition returns the current mouse position
7383 *
74- * @returns {Point } Current cursor position
84+ * @returns {Promise< Point> } Current cursor position
7585 * @memberof NativeAdapter
7686 */
77- public currentMousePosition ( ) : Point {
87+ public currentMousePosition ( ) : Promise < Point > {
7888 return this . mouse . currentMousePosition ( ) ;
7989 }
8090
@@ -83,10 +93,10 @@ export class NativeAdapter {
8393 * Please notice that on e.g. Apples Retina display the reported width
8494 * and the actual pixel size may differ
8595 *
86- * @returns {number } The main screen's width as reported by the OS
96+ * @returns {Promise< number> } The main screen's width as reported by the OS
8797 * @memberof NativeAdapter
8898 */
89- public screenWidth ( ) : number {
99+ public screenWidth ( ) : Promise < number > {
90100 return this . screen . screenWidth ( ) ;
91101 }
92102
@@ -95,10 +105,10 @@ export class NativeAdapter {
95105 * Please notice that on e.g. Apples Retina display the reported width
96106 * and the actual pixel size may differ
97107 *
98- * @returns {number } The main screen's height as reported by the OS
108+ * @returns {Promise< number> } The main screen's height as reported by the OS
99109 * @memberof NativeAdapter
100110 */
101- public screenHeight ( ) : number {
111+ public screenHeight ( ) : Promise < number > {
102112 return this . screen . screenHeight ( ) ;
103113 }
104114
@@ -107,10 +117,10 @@ export class NativeAdapter {
107117 * Please notice that on e.g. Apples Retina display the reported width
108118 * and the actual pixel size may differ
109119 *
110- * @returns {Region } The Region object the size of your main screen
120+ * @returns {Promise< Region> } The Region object the size of your main screen
111121 * @memberof NativeAdapter
112122 */
113- public screenSize ( ) : Region {
123+ public screenSize ( ) : Promise < Region > {
114124 return this . screen . screenSize ( ) ;
115125 }
116126
@@ -182,21 +192,21 @@ export class NativeAdapter {
182192 /**
183193 * pressKey presses and holds a given Key
184194 *
185- * @param {Key } key The Key to press and hold
195+ * @param {Key[] } keys The Keys to press and hold
186196 * @memberof NativeAdapter
187197 */
188- public pressKey ( key : Key ) : void {
189- this . keyboard . pressKey ( key ) ;
198+ public pressKey ( ... keys : Key [ ] ) : void {
199+ this . keyboard . pressKey ( ... keys ) ;
190200 }
191201
192202 /**
193203 * releaseKey releases a Key previously presses via pressKey
194204 *
195- * @param {Key } key The Key to release
205+ * @param {Key[] } keys The Keys to release
196206 * @memberof NativeAdapter
197207 */
198- public releaseKey ( key : Key ) : void {
199- this . keyboard . releaseKey ( key ) ;
208+ public releaseKey ( ... keys : Key [ ] ) : void {
209+ this . keyboard . releaseKey ( ... keys ) ;
200210 }
201211
202212 /**
@@ -252,10 +262,10 @@ export class NativeAdapter {
252262 /**
253263 * paste pastes the current text on the system clipboard
254264 *
255- * @returns {string } The clipboard text
265+ * @returns {Promise< string> } The clipboard text
256266 * @memberof NativeAdapter
257267 */
258- public paste ( ) : string {
268+ public paste ( ) : Promise < string > {
259269 return this . clipboard . paste ( ) ;
260270 }
261271}
0 commit comments