Skip to content

Keyboard

You can send keyboard events to the current page, by using the methods below.

Accessing the object

1
2
3
app = FastRPA()
web = app.browse('https:...')
type(web.keyboard)
Output
fastrpa.core.keyboard.Keyboard

Reference

Info

All keyboard methods are case insensitive.

Get the available command keys

web.keyboad.keys
Output
['ADD',
 'ALT',
 'ARROW_DOWN',
 'ARROW_LEFT',
 'ARROW_RIGHT',
 'ARROW_UP',
 'BACKSPACE',
 'BACK_SPACE',
 ...

Simple key press event

1
2
3
web.keyboad.press('control')
web.keyboad.press('escape')
web.keyboad.press('enter')

Keyboard shortcut event

web.keyboad.shortcut('control', 'a')
web.keyboad.shortcut('control', 'shift', 'c')