tmuxr (version 0.2.4)

send_keys: Send keys to a tmux pane

Description

Send keys to a tmux pane

Usage

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

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab