wrkp {cursr} | R Documentation |
Detect keypress and print it to the terminal screen, while invisibly returning the keypress. The user can specify which characters to ignore, and can also map keys to a list of functions. Any keypress mapped to a function will not be echoed to the screen.
wrkp(ignore = "escape", fn = list(), ...)
ignore |
vector of keypresses to ignore. |
fn |
list of functions, named by key, to be called when key is pressed. |
... |
parameters that are passed to |
NULL
Other writing functions:
wrat()
,
wrch()
,
wrkpl()
,
wr()
## Not run:
wrkp(
ignore="escape",
fn = list(
enter = function(){mv_row(1)},
left = function(){mv(0, -1)},
right = function(){mv(0, 1)},
up = function(){mv(-1,0)},
down = function(){mv(1,0)},
space = function(){cat(" ")}
)
)
## End(Not run)