Skip to content

pane_send_keys

Send a sequence of named keys to a pane.

Send named key presses to a pane.

Parameters:

Name Type Description Default
pane_id str

Target pane identifier.

required
keys Sequence[str]

Key names in the order they should be sent.

required

Returns:

Type Description
OkResult

The server's successful command result.

Example
client = HerdrClient()
client.pane_send_keys("build", ["Enter"])
Source code in src/herdr_client/sync/client.py
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
def pane_send_keys(self, pane_id: str, keys: Sequence[str]) -> OkResult:
    """Send named key presses to a pane.

    Args:
        pane_id: Target pane identifier.
        keys: Key names in the order they should be sent.

    Returns:
        The server's successful command result.

    Example:
        ```python
        client = HerdrClient()
        client.pane_send_keys("build", ["Enter"])
        ```
    """
    params: PaneSendKeysParams = {"pane_id": pane_id, "keys": list(keys)}
    return self.request("pane.send_keys", params)