send_keys: Send keys to a tmux pane

Description Usage Arguments See Also Examples

View source: R/send.R

Description

Send keys to a tmux pane

Usage

1
send_keys(target = NULL, ..., literal = FALSE, count = 1L)

Arguments

target

A tmuxr_session, tmuxr_window, or tmuxr_pane. If NULL, the currently active pane is used. Default: NULL.

...

Strings. Keys to send.

literal

A logical. If TRUE, key name lookup is disabled and the keys are processed as literal UTF-8 characters. Default: FALSE.

count

An integer. Number of times the keys are sent. Default: 1L.

See Also

capture_pane()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
s <- new_session(shell_command = "cat")
send_keys(s, "Speak", "Space", "friend")
send_keys(s, "BSpace", count = 6L)
send_keys(s, "mellon and ")
send_keys(s, "enter", "!", literal = TRUE)
send_keys(s, "enter", literal = FALSE)
capture_pane(s, start = 0L, end = 1L)
kill_session(s)

## End(Not run)

tmuxr documentation built on July 1, 2020, 5:19 p.m.