- Module
- pane
- Declared in
- Pane
- Package
- libtmux
- Source
- packages/libtmux/src/pane.ts
- Other languages
- PythonRubyLuaRustGo Java .NETC++Swift
-
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
- Python
libtmux.Pane.send_keys - Ruby
LibTmux::Pane#send_keys - Lua
libtmux.Pane:send_keys - Rust
pane.Pane.send_keys - Go
tmux.Pane.SendKeys - Java no direct equivalent;
Pane.pastewrites a buffer instead - .NET
LibTmux.Pane.SendKeysAsync - C++
libtmux::Pane::send_text - Swift
Server.sendKeys(_:to:literally:)
- Python
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