Interface: Keyboard
@termwright/driver / Keyboard
Interface: Keyboard
Section titled “Interface: Keyboard”Defined in: driver/src/api.ts:293
@termwright/driver — PTY + VT sessions, locators, actions and waits.
The normative public API lives in api.ts; this module is the only entry
point and re-exports the types from there together with their runtime
implementations.
Example
Section titled “Example”import { launchTerminal } from '@termwright/driver';
const terminal = await launchTerminal({ command: ['node', 'app.js'] });await terminal.waitForText('Ready');await terminal.getByRole('button', { name: 'Approve' }).activate();await terminal.close();Methods
Section titled “Methods”paste()
Section titled “paste()”paste(
text):Promise<void>
Defined in: driver/src/api.ts:296
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
press()
Section titled “press()”press(
keys):Promise<void>
Defined in: driver/src/api.ts:294
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
type()
Section titled “type()”type(
text):Promise<void>
Defined in: driver/src/api.ts:295
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>