MCPcopy
hub / github.com/Textualize/textual / press

Method press

src/textual/pilot.py:76–84  ·  view source on GitHub ↗

Simulate key-presses. Args: *keys: Keys to press.

(self, *keys: str)

Source from the content-addressed store, hash-verified

74 return self._app
75
76 async def press(self, *keys: str) -> None:
77 """Simulate key-presses.
78
79 Args:
80 *keys: Keys to press.
81 """
82 if keys:
83 await self._app._press_keys(keys)
84 await self._wait_for_screen()
85
86 async def resize_terminal(self, width: int, height: int) -> None:
87 """Resize the terminal to the given dimensions.

Calls 2

_wait_for_screenMethod · 0.95
_press_keysMethod · 0.80