Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

View as Markdown

Module
pane
Declared in
Pane
Package
libtmux
Source
packages/libtmux/src/pane.ts
Other languages
PythonRubyLuaRustGo Java .NETC++Swift
sendKeys ( keys : : string , options : : SendKeysOptions ) → Promise<void>
method [source]
method [source]
sendKeys

Send keys to this pane, following them with Enter unless told not to.

Discussed in Control mode vs one-shot · Pane interaction

In other ports Send keystrokes to a pane

Examples

await pane.sendKeys("echo hello");
await pane.sendKeys("C-c", { literal: false });
>>> pane = window.split(shell='sh')
>>> pane.capture_pane()
['$']
>>> pane.send_keys('echo "Hello world"', enter=True)
>>> pane.capture_pane()
['$ echo "Hello world"', 'Hello world', '$']
>>> print('\n'.join(pane.capture_pane())) # doctest: +NORMALIZE_WHITESPACE
$ echo "Hello world"
Hello world
$

Flag-only invocation — reset terminal state without sending any keys:

>>> pane.send_keys(reset=True)

0 declared, 0 inherited

Esc

Type to search.