Core Library0.xAPI reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

PowerShell API

cmdlet libtmux-powershell

LibTmux.Send-TmuxKey

Send an ordered sequence of tmux key tokens to a native pane.

Source and package
Qualified name
LibTmux\Send-TmuxKey
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SendTmuxKeyCommand.cs

Description

Each array element is interpreted by tmux as a key token, such as C-a or Enter. Unrecognized key names follow tmux's character-sending behavior. No additional Enter is appended. Null, empty and NUL-containing tokens are rejected before I/O. The command owns a snapshot of the supplied array.

Keys run in input order through one core command chain. A failure can leave earlier keys delivered and prevent later keys from running.

The endpoint and daemon generation come from the supplied native pane. -WhatIf performs no acquisition or sending. Confirmation names the endpoint and pane without displaying the supplied text or keys. Successful sending confirms tmux accepted input; use an explicit application readiness signal before checking that a command has finished.

Notes

Failures use Tmux.KeySendFailed and retain the original core exception, its dispatch information and the failed pane. -ErrorAction Continue permits later owners to be processed; -ErrorAction Stop stops on the first failure. NUL and invalid key-token content use Tmux.InvalidInput before dispatch; PowerShell handles parameter binding errors. Cancellation stops pending work but cannot undo delivered input. Nothing is retried.

Command details

Command type
cmdlet
Confirmation
Supports -WhatIf and -Confirm; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Pane: A native pane selected from an explicit endpoint.
Outputs
System.Void
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

None: No success objects are emitted. An empty owner pipeline performs no work.

Examples

Example 1 Use a previously selected native $pane on an endpoint you own. View source

Terminal window
$pane | LibTmux\Send-TmuxKey -Key @('C-a', 'Enter') -Confirm:$false

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\Send-TmuxKey.

tmux command

task material

The tmux commands behind Send-TmuxKey.

tmux C API

task material

The C declarations in tmux that implement these commands.

Guides

task material

Pages that discuss Send-TmuxKey.

Esc
Search in

Type to search.

Reference previewOpen reference