readStream.setRawMode(mode)
mode<boolean> 如果为true,则将tty.ReadStream配置为作为原始设备运行。 如果为false,则将tty.ReadStream配置为在其默认模式下运行。readStream.isRaw属性将设置为结果模式。- 返回: <this> 读取流实例。
允许配置 tty.ReadStream,使其作为原始设备运行。
当在原始模式下时,输入总是逐个字符可用,不包括修饰符。
此外,终端对字符的所有特殊处理都被禁用,包括回显输入字符。
Ctrl+C 在此模式下将不再导致 SIGINT。
mode<boolean> Iftrue, configures thetty.ReadStreamto operate as a raw device. Iffalse, configures thetty.ReadStreamto operate in its default mode. ThereadStream.isRawproperty will be set to the resulting mode.- Returns: <this> The read stream instance.
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.