Skip to main content

setRawMode

method ReadStream.prototype.setRawMode
Jump to headingReadStream.prototype.setRawMode(mode: boolean): this

Allows configuration of tty.ReadStream so that it operates as a raw device.

When in raw mode, input is always available character-by-character, not including modifiers. Additionally, all special processing of characters by the terminal is disabled, including echoing input characters. Ctrl+C will no longer cause a SIGINT when in this mode.

Parameters Jump to heading

Jump to headingmode: boolean

If true, configures the tty.ReadStream to operate as a raw device. If false, configures the tty.ReadStream to operate in its default mode. The readStream.isRaw property will be set to the resulting mode.

Return Type Jump to heading

this

The read stream instance.

Back to top