pressKey(key, delay = 0) {
            if (delay > 0) {
                setTimeout(() => {
                    this.keyDown(key);
                    this.keyUp(key);
                }, delay);
            }
            else {
                this.keyDown(key);
                this.keyUp(key);
            }
        }
/**
         * Dispatches a `keydown` and `keyup` event in sequence to simulate pressing a key.
         * @param key Character code (`.key` property) for the key to press.
         * @param delay Length of time to wait (ms) before executing action
         */
Dispatches a `keydown` and `keyup` event in sequence to simulate pressing a key.
@param key Character code (`.key` property) for the key to press.
@param delay Length of time to wait (ms) before executing action
Dispatches a ` keydown ` and ` keyup ` event in sequence to simulate pressing a key . @param key Character code ( ` . key ` property ) for the key to press . @param delay Length of time to wait ( ms ) before executing action
pressKey(key, delay = 0) {
            if (delay > 0) {
                setTimeout(() => {
                    this.keyDown(key);
                    this.keyUp(key);
                }, delay);
            }
            else {
                this.keyDown(key);
                this.keyUp(key);
            }
        }
pressKey ( key , delay = 0 ) { if ( delay > 0 ) { setTimeout ( ( ) => { this . keyDown ( key ) ; this . keyUp ( key ) ; } , delay ) ; } else { this . keyDown ( key ) ; this . keyUp ( key ) ; } }
Dispatches a `keydown` and `keyup` event in sequence to simulate pressing a key.
Dispatches a ` keydown ` and ` keyup ` event in sequence to simulate pressing a key .