Skip to main content
function Deno.setRaw

UNSTABLE: new API, yet to be vetted

Set TTY to be under raw mode or not. In raw mode, characters are read and returned as is, without being processed. All special processing of characters by the terminal is disabled, including echoing input characters. Reading from a TTY device in raw mode is faster than reading from a TTY device in canonical mode.

The cbreak option can be used to indicate that characters that correspond to a signal should still be generated. When disabling raw mode, this option is ignored. This functionality currently only works on Linux and Mac OS.

Deno.setRaw(Deno.stdin.rid, true, { cbreak: true });

Parameters

rid: number
mode: boolean
optional
options: SetRawOptions