Skip to content

TTYOperations

Defined in: src/drivers/tty/tty.ts:40

What a tty driver has to do to move bytes, i.e. struct tty_operations.

optional ioctl?: Record<number, TTYIoctl>

Defined in: src/drivers/tty/tty.ts:54

optional active(tty): string | undefined

Defined in: src/drivers/tty/tty.ts:53

The terminal this one’s output ends up on, which is only interesting for a tty that redirects somewhere else. Providing it is what gives the tty an active attribute, the way only /dev/console and /dev/tty0 have one on Linux.

TTY

string | undefined


optional close(tty): void

Defined in: src/drivers/tty/tty.ts:44

TTY

void


optional open(tty): void

Defined in: src/drivers/tty/tty.ts:43

TTY

void


optional redirect(tty): TTY | undefined

Defined in: src/drivers/tty/tty.ts:59

The terminal a device file really refers to, for a driver that stands in for another terminal. This is what /dev/tty is: a name for whichever terminal is the console.

TTY

TTY | undefined


optional set_termios(tty, old): void

Defined in: src/drivers/tty/tty.ts:46

Called after the line settings change, e.g. when something turns off echo

TTY

Termios

void


optional shutdown(tty): void

Defined in: src/drivers/tty/tty.ts:61

Stop driving the terminal and let go of whatever it is attached to

TTY

void


optional winsize(tty): WinSize | undefined

Defined in: src/drivers/tty/tty.ts:47

TTY

WinSize | undefined


write(tty, data): void

Defined in: src/drivers/tty/tty.ts:42

Send bytes to the terminal. They have already been through output processing.

TTY

Uint8Array

void