Keyboard commands

These commands trigger a keypress on the keyboard.

List of commands

Command Description
I.type
I.press
Press a key or a string of keys
I.pressEnter Press the Enter key
I.pressUp Press the ↑ key
I.pressDown Press the ↓ key
I.pressLeft Press the ← key
I.pressRight Press the → key
I.pressTab Press the Tab key

I.type / I.press

Press a key or a string of keys

Usage

I.type(key)
I.press(key)
Parameters
Parameter Type Remarks
key string Key to press
Example
I.type("Hello")
I.press("?")

I.pressEnter

Press the Enter key.

This is same as using the command I.press("Enter").

Usage

I.pressEnter()

I.pressUp

Press the ↑ key.

This is same as using the command I.press("ArrowUp").

Usage

I.pressUp()

I.pressDown

Press the ↓ key.

This is same as using the command I.press("ArrowDown").

Usage

I.pressDown()

I.pressLeft

Press the ← key.

This is same as using the command I.press("ArrowLeft").

Usage

I.pressLeft()

I.pressRight

Press the → key.

This is same as using the command I.press("ArrowRight").

Usage

I.pressRight()

I.pressTab

Press the → key.

This is same as using the command I.press("Tab").

Usage

I.pressTab()