Skip to contents

Mostly useful in tests: see test_app() for simulating key presses.

Usage

key_event(key)

Arguments

key

Key name such as "a", "enter", "ctrl+c" or "shift+tab".

Value

A KeyEvent.

Examples

key_event("ctrl+c")
#> <KeyEvent key ctrl+c>