keypress: Wait for a single keypress at the terminal

Description

It currently only works at Linux/Unix and OSX terminals, see has_keypress_support.

Usage

1

Details

The following special keys are supported:

Value

The key pressed, a character scalar.

See Also

Other keypress: has_keypress_support

Examples

1
2
3
4
5
## Not run: 
x <- keypress()
cat("You pressed key", x, "\n")

## End(Not run)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.