Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

C# API

method libtmux-dotnet latest

Pane.SendKeysAndWaitAsync

Namespace LibTmux.Pane.SendKeysAndWaitAsync LibTmux

Sends keys to the pane and waits for what it prints in response.

View as Markdown

Source and package
Module
LibTmux
Declared in
Pane
Package
LibTmux
Source
src/LibTmux/Pane.Waiting.cs
SendKeysAndWaitAsync ( keys : SendKeysRequest , wait : PaneWaitRequest , cancellationToken : CancellationToken ) → Task<PaneWaitResult>
methodasync [source]

Description#

The wait reads the screen before the keys go, so output that follows at once is not missed, and judges only what the pane prints afterwards: text already on screen never ends it. A shell echoes typed text back, so literal text ( Literal , as SendTextAsync sends) is removed from what the pane shows before matching, including the part of a line the shell has echoed so far. Waiting for done after typing echo done therefore waits for the command's output, not for the line that was typed.

The removal is by text: output identical to a typed line, as a whole word, is removed too. Key names, and text sent with ExpandFormats , Repeat or a copy-mode command, are not removed.

A typed line the pane wrapped onto a second row is still recognised. Like WaitForTextAsync , the wait sleeps on the pane's output through a control-mode client. Typed literal text may be at most 65536 UTF-8 bytes; ordinary SendKeysAsync has no echo-projection limit.

Parameters
Returns

How the wait ended.

Raises
Esc

Type to search.