Options
All
  • Public
  • Public/Protected
  • All
Menu

The Program instance manages the low level interaction with the terminal and is used by Screen to read and write terminal, and access mouse, etc. Is responsible of reading / writing to the terminal using Tput and support mouse.

It has associated an output writable stream attribute which usually is stdout but could could be configured by the user using IBlessedProgramOptions. The same for an input Readable stream from which the host terminal respond to the program requests.

The communication with the host system is mostly done writing tput sequences to the output stream. It extends tput to add support for mouse and other devices.

The program is responsible of portability and supporting the same API through several terminal standards / vendors

In general users don't have to use the program for develop their applications, however, it can be accessed from the screen and its lower level api can be used along the application.

Example 1

Starting a program alone, and register 'q' to exist

const program = blessed.program({
})
program.setMouse({
allMotion: true,
}, true);
program.alternateBuffer()
program.enableMouse()
program.key(['q', 'escape', 'C-c'], function () {
program.showCursor()
program.disableMouse()
program.normalBuffer()
process.exit(0)
})

Example 2:

Registering for resize, blur, and focus terminal window native events:

program.setMouse({ sendFocus: true }, true)
program.on('resize', function (data) {
setTimeout(function () {
program.clear();
program.cup(0, 0);
}, 200);
});
process.on('SIGWINCH', function (data) {
setTimeout(function () {
program.cup(1, 0);
}, 200);
});
program.on('focus', function (data) {
program.clear();
program.cup(0, 0);
});
program.on('blur', function (data) {
program.clear();
program.cup(0, 0);
});

Example 3:

Drawing on mouse move

program.setBackground('green', 'O')
program.setForeground('red', 'i')
program.on('mouse', function (data) {
program.cup(data.y, data.x);
program.write(' ', 'blue bg');
program.write('as', 'red fg');
program.cup(0, 0);
});

Example 4

Setting the cursor style

program.showCursor();
program.setCursorStyle(1);
setTimeout(() => {
program.setCursorStyle(2);
}, 9000);
setTimeout(() => {
program.setCursorStyle(4);
}, 3000);
setTimeout(() => {
program.setCursorStyle(3);
}, 6000);

Example 5

Minimize / Maximize the terminal window and requesting it size and position and cursor

program.write('MINIMIZING IN 2 seconds')
setTimeout(() => {
program.manipulateWindow(2, (err, data)=>{
program.log(data);
})
}, 2000)
setTimeout(() => {
program.manipulateWindow(1, (err, data)=>{
program.log(data);
})
}, 4000)
program.getCursor(function(err, data) {
program.write(util.inspect(data));
});
program.getWindowSize(function(err:any, data:any) {
program.log('getWindowSize', data);
});

Hierarchy

  • Tput
    • BlessedProgram

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

PCRomSet

PCRomSet: boolean

_buf

_buf: string

_terminal

_terminal: string

_tputSetup

_tputSetup: boolean

acsc

acsc: object

Type declaration

  • [c: string]: string

acscr

acscr: object

Type declaration

  • [c: string]: string

all

all: object

Type declaration

  • [cap: string]: any

am

am: boolean

auto_left_margin

auto_left_margin: boolean

auto_right_margin

auto_right_margin: boolean

back_color_erase

back_color_erase: boolean

backspace_delay

backspace_delay: number

backspaces_with_bs

backspaces_with_bs: boolean

bce

bce: boolean

beehive_glitch

beehive_glitch: boolean

bit_image_entwining

bit_image_entwining: number

bit_image_type

bit_image_type: number

bitwin

bitwin: number

bitype

bitype: number

bools

bools: object

Type declaration

  • [cap: string]: any

brokenACS

brokenACS: boolean

btns

btns: number

buffer_capacity

buffer_capacity: number

bufsz

bufsz: number

buttons

buttons: number

bw

bw: boolean

can_change

can_change: boolean

carriage_return_delay

carriage_return_delay: number

ccc

ccc: boolean

ceol_standout_glitch

ceol_standout_glitch: boolean

chts

chts: boolean

col_addr_glitch

col_addr_glitch: boolean

colors

colors: number

cols

cols: number

columns

columns: number

cpi_changes_res

cpi_changes_res: boolean

cpix

cpix: boolean

cps

cps: number

cr_cancels_micro_mode

cr_cancels_micro_mode: boolean

crt_no_scrolling

crt_no_scrolling: boolean

crxm

crxm: boolean

cursorHidden

cursorHidden: boolean

daisy

daisy: boolean

db

db: boolean

dest_tabs_magic_smso

dest_tabs_magic_smso: boolean

dot_horz_spacing

dot_horz_spacing: number

dot_vert_spacing

dot_vert_spacing: number

eat_newline_glitch

eat_newline_glitch: boolean

eo

eo: boolean

erase_overstrike

erase_overstrike: boolean

error

error: Error

eslok

eslok: boolean

extended

extended: boolean

features

features: TputFeatures

generic_type

generic_type: boolean

gn

gn: boolean

gnu_has_meta_key

gnu_has_meta_key: boolean

Optional gpm

internal

hard_copy

hard_copy: boolean

hard_cursor

hard_cursor: boolean

has_hardware_tabs

has_hardware_tabs: boolean

has_meta_key

has_meta_key: boolean

has_print_wheel

has_print_wheel: boolean

has_status_line

has_status_line: boolean

hc

hc: boolean

hls

hls: boolean

horizontal_tab_delay

horizontal_tab_delay: number

hs

hs: boolean

hue_lightness_saturation

hue_lightness_saturation: boolean

hz

hz: boolean

in

in: boolean

info

info: TputInfo

init_tabs

init_tabs: number

input

input: Readable

insert_null_glitch

insert_null_glitch: boolean

isAlt

isAlt: boolean

isLXDE

isLXDE: boolean

isOSXTerm

isOSXTerm: boolean

isRxvt

isRxvt: boolean

isTerminator

isTerminator: boolean

isVTE

isVTE: boolean

isXFCE

isXFCE: boolean

isXterm

isXterm: boolean

isiTerm2

isiTerm2: boolean

it

it: number

kNXT6

kNXT6: number

kNXT7

kNXT7: number

km

km: boolean

label_height

label_height: number

label_width

label_width: number

lh

lh: number

linefeed_is_newline

linefeed_is_newline: boolean

lines

lines: number

lines_of_memory

lines_of_memory: number

lm

lm: number

lpi_changes_res

lpi_changes_res: boolean

lpix

lpix: boolean

lw

lw: number

ma

ma: number

maddr

maddr: number

magicCookie

magicCookie: boolean

magic_cookie_glitch

magic_cookie_glitch: number

magic_cookie_glitch_ul

magic_cookie_glitch_ul: number

max_attributes

max_attributes: number

max_colors

max_colors: number

max_micro_address

max_micro_address: number

max_micro_jump

max_micro_jump: number

max_pairs

max_pairs: number

maximum_windows

maximum_windows: number

mc5i

mc5i: boolean

mcs

mcs: number

memory_above

memory_above: boolean

memory_below

memory_below: boolean

methods

methods: object

Type declaration

  • [cap: string]: any

micro_char_size

micro_char_size: number

micro_col_size

micro_col_size: number

micro_line_size

micro_line_size: number

mir

mir: boolean

mjump

mjump: number

mls

mls: number

mouseEnabled

mouseEnabled: boolean

move_insert_mode

move_insert_mode: boolean

move_standout_mode

move_standout_mode: boolean

msgr

msgr: boolean

mux

mux: boolean

ncv

ncv: number

ndscr

ndscr: boolean

needs_xon_xoff

needs_xon_xoff: boolean

new_line_delay

new_line_delay: number

nlab

nlab: number

no_color_video

no_color_video: number

no_correctly_working_cr

no_correctly_working_cr: boolean

no_esc_ctlc

no_esc_ctlc: boolean

no_pad_char

no_pad_char: boolean

non_dest_scroll_region

non_dest_scroll_region: boolean

non_rev_rmcup

non_rev_rmcup: boolean

npc

npc: boolean

npins

npins: number

nrrmc

nrrmc: boolean

num_labels

num_labels: number

number_of_function_keys

number_of_function_keys: number

number_of_pins

number_of_pins: number

numbers

numbers: object

Type declaration

  • [cap: string]: any

nxon

nxon: boolean

options

orc

orc: number

orhi

orhi: number

orl

orl: number

orvi

orvi: number

os

os: boolean

output

output: Writable

output_res_char

output_res_char: number

output_res_horz_inch

output_res_horz_inch: number

output_res_line

output_res_line: number

output_res_vert_inch

output_res_vert_inch: number

over_strike

over_strike: boolean

padding

padding: boolean

padding_baud_rate

padding_baud_rate: number

pairs

pairs: number

pb

pb: number

print_rate

print_rate: number

printf

printf: boolean

prtr_silent

prtr_silent: boolean

put

put: object

it contains all tput operations bind to input so automatically call _write using the return value. Example: this.put.pad() is the equivalent to this._write(this.tput.pad()).

Type declaration

  • [s: string]: function
      • (...args: any[]): any
      • Parameters

        • Rest ...args: any[]

        Returns any

restoreReportedCursor

restoreReportedCursor: function

Type declaration

    • (): boolean
    • Returns boolean

resume

resume: function

Type declaration

    • (): void
    • Returns void

return_does_clr_eol

return_does_clr_eol: boolean

row_addr_glitch

row_addr_glitch: boolean

rows

rows: number

sam

sam: boolean

savedX

savedX: number

savedY

savedY: number

scrollBottom

scrollBottom: number

scrollTop

scrollTop: number

semi_auto_right_margin

semi_auto_right_margin: boolean

setbuf

setbuf: boolean

spinh

spinh: number

spinv

spinv: number

status_line_esc_ok

status_line_esc_ok: boolean

strings

strings: object

Type declaration

  • [cap: string]: any

teleray_glitch

teleray_glitch: boolean

termcap

termcap: boolean

termcapFile

termcapFile: string

terminal

terminal: string

terminfoFile

terminfoFile: string

terminfoPrefix

terminfoPrefix: string

tilde_glitch

tilde_glitch: boolean

tmux

tmux: boolean

tmuxVersion

tmuxVersion: number

tput

tput: Tput

transparent_underline

transparent_underline: boolean

type

type: string

ul

ul: boolean

unicode

unicode: boolean

useBuffer

useBuffer: boolean

virtual_terminal

virtual_terminal: number

vt

vt: number

widcs

widcs: number

wide_char_size

wide_char_size: number

width_status_line

width_status_line: number

wnum

wnum: number

wsl

wsl: number

x

x: number

xenl

xenl: boolean

xhp

xhp: boolean

xhpa

xhpa: boolean

xmc

xmc: number

xon

xon: boolean

xon_xoff

xon_xoff: boolean

xsb

xsb: boolean

xt

xt: boolean

xvpa

xvpa: boolean

y

y: number

zero

zero: boolean

Is zero-based indexes for col, row values.

Static instances

instances: BlessedProgram[]
internal

Methods

HPositionRelative

  • HPositionRelative(param?: number): boolean

HVPosition

  • HVPosition(row?: number, col?: number): boolean

VPositionRelative

  • VPositionRelative(param?: number): boolean

_attr

  • _attr(attrs: string | string[], enable: boolean): string
  • Returns the string with given attr enabled or disabled, for example:

    program._write(program._attr('green fg', true) + 'GREEN' +
    program._attr('green fg', false) + ' NORMAL')
    
    program._write('\n\n' + program._attr(['yellow fg', 'bold', 'blue bg'], true) + 'bg, fg, bold' +
    program._attr('default fg', true) + ' No FG ' +
    program._attr('default bg', true) + ' No BG ' +
    program._attr('bold', false) + ' No bold '
    )

    Parameters

    • attrs: string | string[]
    • enable: boolean

    Returns string

_ncoords

  • _ncoords(): void

_write

  • _write(text: string): boolean

acs_btee

  • acs_btee(...args: any[]): any

acs_chars

  • acs_chars(...args: any[]): any

acs_hline

  • acs_hline(...args: any[]): any

acs_llcorner

  • acs_llcorner(...args: any[]): any

acs_lrcorner

  • acs_lrcorner(...args: any[]): any

acs_ltee

  • acs_ltee(...args: any[]): any

acs_plus

  • acs_plus(...args: any[]): any

acs_rtee

  • acs_rtee(...args: any[]): any

acs_ttee

  • acs_ttee(...args: any[]): any

acs_ulcorner

  • acs_ulcorner(...args: any[]): any

acs_urcorner

  • acs_urcorner(...args: any[]): any

acs_vline

  • acs_vline(...args: any[]): any

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

ae

  • ae(): boolean

alt_scancode_esc

  • alt_scancode_esc(...args: any[]): any

alternate

  • alternate(): boolean

alternateBuffer

  • alternateBuffer(): boolean

arrow_key_map

  • arrow_key_map(...args: any[]): any

as

  • as(): boolean

back

  • back(n?: number): boolean

back_tab

  • back_tab(...args: any[]): any

backspace

  • backspace(): boolean

backspace_if_not_bs

  • backspace_if_not_bs(...args: any[]): any

bel

  • bel(): boolean

bell

  • bell(): boolean

bg

  • bg(color: string, val?: string): boolean

bicr

  • bicr(...args: any[]): any

bindMouse

  • bindMouse(): void

bindResponse

  • bindResponse(): void

binel

  • binel(...args: any[]): any

birep

  • birep(...args: any[]): any

bit_image_carriage_return

  • bit_image_carriage_return(...args: any[]): any

bit_image_newline

  • bit_image_newline(...args: any[]): any

bit_image_repeat

  • bit_image_repeat(...args: any[]): any

blink

  • blink(...args: any[]): any

bold

  • bold(...args: any[]): any

box_chars_1

  • box_chars_1(...args: any[]): any

carriage_return

  • carriage_return(...args: any[]): any

cbt

  • cbt(param?: number): boolean

cha

  • cha(param?: number): boolean

change_char_pitch

  • change_char_pitch(...args: any[]): any

change_line_pitch

  • change_line_pitch(...args: any[]): any

change_res_horz

  • change_res_horz(...args: any[]): any

change_res_vert

  • change_res_vert(...args: any[]): any

change_scroll_region

  • change_scroll_region(...args: any[]): any

charAttributes

  • charAttributes(param: string, val?: string): boolean
  • charAttributes(param: string[], val?: string): boolean
  • ``` CSI Pm m Character Attributes (SGR). Ps = 0 -> Normal (default). Ps = 1 -> Bold. Ps = 4 -> Underlined. Ps = 5 -> Blink (appears as Bold). Ps = 7 -> Inverse. Ps = 8 -> Invisible, i.e., hidden (VT300). Ps = 2 2 -> Normal (neither bold nor faint). Ps = 2 4 -> Not underlined. Ps = 2 5 -> Steady (not blinking). Ps = 2 7 -> Positive (not inverse). Ps = 2 8 -> Visible, i.e., not hidden (VT300). Ps = 3 0 -> Set foreground color to Black. Ps = 3 1 -> Set foreground color to Red. Ps = 3 2 -> Set foreground color to Green. Ps = 3 3 -> Set foreground color to Yellow. Ps = 3 4 -> Set foreground color to Blue. Ps = 3 5 -> Set foreground color to Magenta. Ps = 3 6 -> Set foreground color to Cyan. Ps = 3 7 -> Set foreground color to White. Ps = 3 9 -> Set foreground color to default (original). Ps = 4 0 -> Set background color to Black. Ps = 4 1 -> Set background color to Red. Ps = 4 2 -> Set background color to Green. Ps = 4 3 -> Set background color to Yellow. Ps = 4 4 -> Set background color to Blue. Ps = 4 5 -> Set background color to Magenta. Ps = 4 6 -> Set background color to Cyan. Ps = 4 7 -> Set background color to White. Ps = 4 9 -> Set background color to default (original).

    If 16-color support is compiled, the following apply. Assume that xterm's resources are set so that the ISO color codes are the first 8 of a set of 16. Then the aixterm colors are the bright versions of the ISO colors: Ps = 9 0 -> Set foreground color to Black. Ps = 9 1 -> Set foreground color to Red. Ps = 9 2 -> Set foreground color to Green. Ps = 9 3 -> Set foreground color to Yellow. Ps = 9 4 -> Set foreground color to Blue. Ps = 9 5 -> Set foreground color to Magenta. Ps = 9 6 -> Set foreground color to Cyan. Ps = 9 7 -> Set foreground color to White. Ps = 1 0 0 -> Set background color to Black. Ps = 1 0 1 -> Set background color to Red. Ps = 1 0 2 -> Set background color to Green. Ps = 1 0 3 -> Set background color to Yellow. Ps = 1 0 4 -> Set background color to Blue. Ps = 1 0 5 -> Set background color to Magenta. Ps = 1 0 6 -> Set background color to Cyan. Ps = 1 0 7 -> Set background color to White.

    If xterm is compiled with the 16-color support disabled, it supports the following, from rxvt: Ps = 1 0 0 -> Set foreground and background color to default.

    If 88- or 256-color support is compiled, the following apply. Ps = 3 8 ; 5 ; Ps -> Set foreground color to the second Ps. Ps = 4 8 ; 5 ; Ps -> Set background color to the second Ps.

    Parameters

    • param: string
    • Optional val: string

    Returns boolean

  • Parameters

    • param: string[]
    • Optional val: string

    Returns boolean

charPosAbsolute

  • charPosAbsolute(param?: number): boolean

char_padding

  • char_padding(...args: any[]): any

char_set_names

  • char_set_names(...args: any[]): any

charset

  • charset(val?: "scld" | "uk" | "us" | "dutch" | "finnish" | "french" | "frenchcanadian" | "german" | "italian" | "norwegiandanish" | "spanish" | "swedish" | "swiss", level?: 0 | 1 | 2 | 3): boolean
  • Parameters

    • Optional val: "scld" | "uk" | "us" | "dutch" | "finnish" | "french" | "frenchcanadian" | "german" | "italian" | "norwegiandanish" | "spanish" | "swedish" | "swiss"
    • Optional level: 0 | 1 | 2 | 3

    Returns boolean

chr

  • chr(...args: any[]): any

cht

  • cht(param?: number): boolean

civis

  • civis(): boolean

clear

  • clear(): boolean

clear_all_tabs

  • clear_all_tabs(...args: any[]): any

clear_margins

  • clear_margins(...args: any[]): any

clear_screen

  • clear_screen(...args: any[]): any

clr_bol

  • clr_bol(...args: any[]): any

clr_eol

  • clr_eol(...args: any[]): any

clr_eos

  • clr_eos(...args: any[]): any

cmdch

  • cmdch(...args: any[]): any

cnl

  • cnl(param?: number): boolean

cnorm

  • cnorm(...args: any[]): any

code_set_init

  • code_set_init(...args: any[]): any

color_names

  • color_names(...args: any[]): any

colornm

  • colornm(...args: any[]): any

column_address

  • column_address(...args: any[]): any

command_character

  • command_character(...args: any[]): any

copyRectangle

  • copyRectangle(...args: string[]): boolean
  • ``` CSI Pt; Pl; Pb; Pr; Pp; Pt; Pl; Pp$ v Copy Rectangular Area (DECCRA, VT400 and up). Pt; Pl; Pb; Pr denotes the rectangle. Pp denotes the source page. Pt; Pl denotes the target location. Pp denotes the target page. NOTE: xterm doesn't enable this code by default. ```

    Parameters

    • Rest ...args: string[]

    Returns boolean

copyToClipboard

  • copyToClipboard(text: string): boolean
  • Specific to iTerm2, but I think it's really cool. Example:

    if (!screen.copyToClipboard(text)) {
    execClipboardProgram(text);
    }

    Parameters

    • text: string

    Returns boolean

cpi

  • cpi(...args: any[]): any

cpl

  • cpl(param?: number): boolean

cr

  • cr(): boolean

create_window

  • create_window(...args: any[]): any

csin

  • csin(...args: any[]): any

csnm

  • csnm(...args: any[]): any

csr

  • csr(top: number, bottom: number): boolean

cub

  • cub(n?: number): boolean

cub1

  • cub1(...args: any[]): any

cud

  • cud(n?: number): boolean

cud1

  • cud1(...args: any[]): any

cuf

  • cuf(n?: number): boolean

cuf1

  • cuf1(...args: any[]): any

cup

  • cup(row?: number, col?: number): boolean

cursorBackward

  • cursorBackward(n?: number): boolean

cursorBackwardTab

  • cursorBackwardTab(param?: number): boolean

cursorCharAbsolute

  • cursorCharAbsolute(x: number): number
  • cursorCharAbsolute(param?: number): boolean

cursorColor

  • cursorColor(color: string): boolean

cursorDown

  • cursorDown(n?: number): boolean

cursorForward

  • cursorForward(n?: number): boolean

cursorForwardTab

  • cursorForwardTab(param?: number): boolean

cursorNextLine

  • cursorNextLine(param?: number): boolean

cursorPos

  • cursorPos(row?: number, col?: number): boolean
  • CSI Ps ; Ps H Cursor Position [ row;column ] (default = [ 1,1 ]) (CUP).

    Parameters

    • Optional row: number
    • Optional col: number

    Returns boolean

cursorPrecedingLine

  • cursorPrecedingLine(param?: number): boolean

cursorReset

  • cursorReset(): boolean

cursorShape

  • cursorShape(shape: "block" | "underline" | "line", blink?: boolean): boolean

cursorUp

  • cursorUp(n?: number): boolean

cursor_address

  • cursor_address(...args: any[]): any

cursor_down

  • cursor_down(...args: any[]): any

cursor_home

  • cursor_home(...args: any[]): any

cursor_invisible

  • cursor_invisible(): boolean

cursor_left

  • cursor_left(...args: any[]): any

cursor_mem_address

  • cursor_mem_address(...args: any[]): any

cursor_normal

  • cursor_normal(...args: any[]): any

cursor_right

  • cursor_right(...args: any[]): any

cursor_to_ll

  • cursor_to_ll(...args: any[]): any

cursor_up

  • cursor_up(...args: any[]): any

cursor_visible

  • cursor_visible(...args: any[]): any

cuu

  • cuu(param?: number): boolean

cuu1

  • cuu1(...args: any[]): any

cvr

  • cvr(...args: any[]): any

cvvis

  • cvvis(...args: any[]): any

cwin

  • cwin(...args: any[]): any

da

  • da(param?: number, callback?: Function): boolean

dch

  • dch(param?: number): boolean

dch1

  • dch1(...args: any[]): any

dclk

  • dclk(...args: any[]): any

debug

  • debug(s: string): boolean

deccara

  • deccara(...args: string[]): boolean

deccra

  • deccra(...args: string[]): boolean

decdc

  • decdc(...args: string[]): boolean

decefr

  • decefr(...args: string[]): boolean

decelr

  • decelr(...args: string[]): boolean

decera

  • decera(...args: string[]): boolean

decfra

  • decfra(...args: string[]): boolean

decic

  • decic(...args: string[]): boolean

decll

  • decll(param?: number): boolean

decrara

  • decrara(...args: string[]): boolean

decreqtparm

  • decreqtparm(param: number): boolean

decrqlp

decrqm

  • decrqm(param?: number): boolean

decrqmp

  • decrqmp(param?: number): boolean

decrst

  • decrst(...args: string[]): boolean

decsace

  • decsace(param?: number): boolean

decsca

  • decsca(param?: number): boolean

decscl

  • decscl(...args: string[]): boolean

decscursr

  • decscursr(cursor: number): boolean

decsera

  • decsera(...args: string[]): boolean

decset

  • decset(...args: string[]): boolean

decsle

  • decsle(...args: string[]): boolean

decstbm

  • decstbm(top: number, bottom: number): boolean

decstr

  • decstr(): boolean

decswbv

  • decswbv(param?: number): boolean

dectcemh

  • dectcemh(): boolean

defbi

  • defbi(...args: any[]): any

defc

  • defc(...args: any[]): any

define_bit_image_region

  • define_bit_image_region(...args: any[]): any

define_char

  • define_char(...args: any[]): any

deleteChars

  • deleteChars(param?: number): boolean

deleteColumns

  • deleteColumns(...args: string[]): boolean
  • CSI P m SP ~
    Delete P s Column(s) (default = 1) (DECDC), VT420 and up
    NOTE: xterm doesn't enable this code by default.

    Parameters

    • Rest ...args: string[]

    Returns boolean

deleteLines

  • deleteLines(param?: number): boolean

delete_character

  • delete_character(...args: any[]): any

delete_line

  • delete_line(...args: any[]): any

destroy

  • destroy(): void

deviceStatus

  • CSI Ps n  Device Status Report (DSR).
    Ps = 5  -> Status Report.  Result (``OK'') is
    CSI 0 n
    Ps = 6  -> Report Cursor Position (CPR) [row;column].
    Result is
    CSI r ; c R
    CSI ? Ps n
    Device Status Report (DSR, DEC-specific).
    Ps = 6  -> Report Cursor Position (CPR) [row;column] as CSI
    ? r ; c R (assumes page is zero).
    Ps = 1 5  -> Report Printer status as CSI ? 1 0  n  (ready).
    or CSI ? 1 1  n  (not ready).
    Ps = 2 5  -> Report UDK status as CSI ? 2 0  n  (unlocked)
    or CSI ? 2 1  n  (locked).
    Ps = 2 6  -> Report Keyboard status as
    CSI ? 2 7  ;  1  ;  0  ;  0  n  (North American).
    The last two parameters apply to VT400 & up, and denote key-
    board ready and LK01 respectively.
    Ps = 5 3  -> Report Locator status as
    CSI ? 5 3  n  Locator available, if compiled-in, or
    CSI ? 5 0  n  No Locator, if not.

    Parameters

    • Optional param: string
    • Optional callback: ProgramResponseCallback
    • Optional dec: boolean
    • Optional noBypass: boolean

    Returns boolean

device_type

  • device_type(...args: any[]): any

devt

  • devt(...args: any[]): any

dial

  • dial(...args: any[]): any

dial_phone

  • dial_phone(...args: any[]): any

dim

  • dim(...args: any[]): any

dis_status_line

  • dis_status_line(...args: any[]): any

disableGpm

  • disableGpm(): void

disableModifieres

  • disableModifieres(...args: string[]): boolean

disableMouse

  • disableMouse(): void

dispc

  • dispc(...args: any[]): any

display_clock

  • display_clock(...args: any[]): any

display_pc_char

  • display_pc_char(...args: any[]): any

dl

  • dl(param?: number): boolean

dl1

  • dl1(...args: any[]): any

docr

  • docr(...args: any[]): any

down

  • down(n?: number): boolean

down_half_line

  • down_half_line(...args: any[]): any

dsl

  • dsl(...args: any[]): any

dsr

  • dsr(param?: string, callback?: Function, dec?: boolean, noBypass?: boolean): boolean

dynamicColors

  • dynamicColors(param?: string): boolean

ech

  • ech(param?: number): boolean

echo

  • echo(text: string, attr?: boolean): boolean

ed

  • ed(param?: string): boolean

ehhlm

  • ehhlm(...args: any[]): any

el

  • el(param?: string): boolean

el1

  • el1(...args: any[]): any

elhlm

  • elhlm(...args: any[]): any

elohlm

  • elohlm(...args: any[]): any

emit

  • emit(event: string | symbol, ...args: any[]): boolean

ena_acs

  • ena_acs(...args: any[]): any

enableFilterRectangle

  • enableFilterRectangle(...args: string[]): boolean
  • ` CSI Pt ; Pl ; Pb ; Pr ' w Enable Filter Rectangle (DECEFR), VT420 and up. Parameters are [top;left;bottom;right]. Defines the coordinates of a filter rectangle and activates it. Anytime the locator is detected outside of the filter rectangle, an outside rectangle event is generated and the rectangle is disabled. Filter rectangles are always treated as "one-shot" events. Any parameters that are omitted default to the current locator position. If all parameters are omit- ted, any locator motion will be reported. DECELR always can- cels any prevous rectangle definition.`

    Parameters

    • Rest ...args: string[]

    Returns boolean

enableGpm

  • enableGpm(): void

enableLocatorReporting

  • enableLocatorReporting(...args: string[]): boolean
  • ```

    CSI Ps ; Pu ' z Enable Locator Reporting (DECELR). Valid values for the first parameter: Ps = 0 -> Locator disabled (default). Ps = 1 -> Locator enabled. Ps = 2 -> Locator enabled for one report, then disabled. The second parameter specifies the coordinate unit for locator reports. Valid values for the second parameter: Pu = 0 <- or omitted -> default to character cells. Pu = 1 <- device physical pixels. Pu = 2 <- character cells.

    Parameters

    • Rest ...args: string[]

    Returns boolean

enableMouse

  • enableMouse(): void

enacs

  • enacs(...args: any[]): any

end_bit_image_region

  • end_bit_image_region(...args: any[]): any

endbi

  • endbi(...args: any[]): any

enter_alt_charset_mode

  • enter_alt_charset_mode(): boolean

enter_am_mode

  • enter_am_mode(...args: any[]): any

enter_blink_mode

  • enter_blink_mode(...args: any[]): any

enter_bold_mode

  • enter_bold_mode(...args: any[]): any

enter_ca_mode

  • enter_ca_mode(...args: any[]): any

enter_delete_mode

  • enter_delete_mode(...args: any[]): any

enter_dim_mode

  • enter_dim_mode(...args: any[]): any

enter_doublewide_mode

  • enter_doublewide_mode(...args: any[]): any

enter_draft_quality

  • enter_draft_quality(...args: any[]): any

enter_horizontal_hl_mode

  • enter_horizontal_hl_mode(...args: any[]): any

enter_insert_mode

  • enter_insert_mode(...args: any[]): any

enter_italics_mode

  • enter_italics_mode(...args: any[]): any

enter_left_hl_mode

  • enter_left_hl_mode(...args: any[]): any

enter_leftward_mode

  • enter_leftward_mode(...args: any[]): any

enter_low_hl_mode

  • enter_low_hl_mode(...args: any[]): any

enter_micro_mode

  • enter_micro_mode(...args: any[]): any

enter_near_letter_quality

  • enter_near_letter_quality(...args: any[]): any

enter_normal_quality

  • enter_normal_quality(...args: any[]): any

enter_pc_charset_mode

  • enter_pc_charset_mode(...args: any[]): any

enter_protected_mode

  • enter_protected_mode(...args: any[]): any

enter_reverse_mode

  • enter_reverse_mode(...args: any[]): any

enter_right_hl_mode

  • enter_right_hl_mode(...args: any[]): any

enter_scancode_mode

  • enter_scancode_mode(...args: any[]): any

enter_secure_mode

  • enter_secure_mode(...args: any[]): any

enter_shadow_mode

  • enter_shadow_mode(...args: any[]): any

enter_standout_mode

  • enter_standout_mode(...args: any[]): any

enter_subscript_mode

  • enter_subscript_mode(...args: any[]): any

enter_superscript_mode

  • enter_superscript_mode(...args: any[]): any

enter_top_hl_mode

  • enter_top_hl_mode(...args: any[]): any

enter_underline_mode

  • enter_underline_mode(...args: any[]): any

enter_upward_mode

  • enter_upward_mode(...args: any[]): any

enter_vertical_hl_mode

  • enter_vertical_hl_mode(...args: any[]): any

enter_xon_mode

  • enter_xon_mode(...args: any[]): any

eraseChars

  • eraseChars(param?: number): boolean

eraseInDisplay

  • eraseInDisplay(param?: string): boolean

eraseInLine

  • eraseInLine(param?: string): boolean

eraseRectangle

  • eraseRectangle(...args: string[]): boolean

erase_chars

  • erase_chars(...args: any[]): any

erhlm

  • erhlm(...args: any[]): any

ethlm

  • ethlm(...args: any[]): any

eventNames

  • eventNames(): (string | symbol)[]

evhlm

  • evhlm(...args: any[]): any

exit_alt_charset_mode

  • exit_alt_charset_mode(): boolean

exit_am_mode

  • exit_am_mode(...args: any[]): any

exit_attribute_mode

  • exit_attribute_mode(...args: any[]): any

exit_ca_mode

  • exit_ca_mode(...args: any[]): any

exit_delete_mode

  • exit_delete_mode(...args: any[]): any

exit_doublewide_mode

  • exit_doublewide_mode(...args: any[]): any

exit_insert_mode

  • exit_insert_mode(...args: any[]): any

exit_italics_mode

  • exit_italics_mode(...args: any[]): any

exit_leftward_mode

  • exit_leftward_mode(...args: any[]): any

exit_micro_mode

  • exit_micro_mode(...args: any[]): any

exit_pc_charset_mode

  • exit_pc_charset_mode(...args: any[]): any

exit_scancode_mode

  • exit_scancode_mode(...args: any[]): any

exit_shadow_mode

  • exit_shadow_mode(...args: any[]): any

exit_standout_mode

  • exit_standout_mode(...args: any[]): any

exit_subscript_mode

  • exit_subscript_mode(...args: any[]): any

exit_superscript_mode

  • exit_superscript_mode(...args: any[]): any

exit_underline_mode

  • exit_underline_mode(...args: any[]): any

exit_upward_mode

  • exit_upward_mode(...args: any[]): any

exit_xon_mode

  • exit_xon_mode(...args: any[]): any

feed

  • feed(): boolean

ff

  • ff(): boolean

fg

  • fg(color: string, val?: boolean): string

fillRectangle

  • fillRectangle(Pc: string, Pt: number, pl: number, pb: number, pr: number): boolean
  • CSI Pc; Pt; Pl; Pb; Pr$ x
    Fill Rectangular Area (DECFRA), VT420 and up.
    Pc is the character to use.
    Pt; Pl; Pb; Pr denotes the rectangle.
    NOTE: xterm doesn't enable this code by default.

    Parameters

    • Pc: string
    • Pt: number
    • pl: number
    • pb: number
    • pr: number

    Returns boolean

fixed_pause

  • fixed_pause(...args: any[]): any

flash

  • flash(...args: any[]): any

flash_hook

  • flash_hook(...args: any[]): any

flash_screen

  • flash_screen(...args: any[]): any

fln

  • fln(...args: any[]): any

flush

  • flush(): void

form

  • form(): boolean

form_feed

  • form_feed(...args: any[]): any

forward

  • forward(n?: number): boolean

from_status_line

  • from_status_line(...args: any[]): any

fsl

  • fsl(...args: any[]): any

getCursor

getCursorColor

  • getCursorColor(callback: Function): boolean
  • Get's the cursor color. Example call:

    program.getCursor(function(err, data) {
    program.log('getCursor', data);
    program.write(util.inspect(data));
    });

    Parameters

    • callback: Function

    Returns boolean

getMaxListeners

  • getMaxListeners(): number

getTextParams

  • getTextParams(param: string, callback: Function): boolean

getWindowSize

get_mouse

  • get_mouse(...args: any[]): any

getm

  • getm(...args: any[]): any

goto_window

  • goto_window(...args: any[]): any

hangup

  • hangup(...args: any[]): any

has

  • has(name: string): boolean

hd

  • hd(...args: any[]): any

hideCursor

  • hideCursor(): boolean

home

  • home(...args: any[]): any

hook

  • hook(...args: any[]): any

hpa

  • hpa(param?: number): boolean

ht

  • ht(): boolean

hts

  • hts(...args: any[]): any

hu

  • hu(...args: any[]): any

hup

  • hup(...args: any[]): any

hvp

  • hvp(row?: number, col?: number): boolean

ich

  • ich(param?: number): boolean

ich1

  • ich1(...args: any[]): any

if

  • if(...args: any[]): any

il

  • il(param?: number): boolean

il1

  • il1(...args: any[]): any

ind

  • ind(): boolean

index

  • index(): boolean

indn

  • indn(...args: any[]): any

initMouseTracking

  • initMouseTracking(...args: string[]): boolean
  • CSI Ps ; Ps ; Ps ; Ps ; Ps T
    Initiate highlight mouse tracking.  Parameters are
    [func;startx;starty;firstrow;lastrow].  See the section Mouse
    Tracking.

    Parameters

    • Rest ...args: string[]

    Returns boolean

init_1string

  • init_1string(...args: any[]): any

init_2string

  • init_2string(...args: any[]): any

init_3string

  • init_3string(...args: any[]): any

init_file

  • init_file(...args: any[]): any

init_prog

  • init_prog(...args: any[]): any

initc

  • initc(...args: any[]): any

initialize_color

  • initialize_color(...args: any[]): any

initialize_pair

  • initialize_pair(...args: any[]): any

initp

  • initp(...args: any[]): any

insertChars

  • insertChars(param?: number): boolean

insertColumns

  • insertColumns(...args: string[]): boolean
  • CSI P m SP }
    Insert P s Column(s) (default = 1) (DECIC), VT420 and up.
    NOTE: xterm doesn't enable this code by default.

    Parameters

    • Rest ...args: string[]

    Returns boolean

insertLines

  • insertLines(param?: number): boolean

insert_character

  • insert_character(...args: any[]): any

insert_line

  • insert_line(...args: any[]): any

insert_padding

  • insert_padding(...args: any[]): any

invis

  • invis(...args: any[]): any

ip

  • ip(...args: any[]): any

iprog

  • iprog(...args: any[]): any

is1

  • is1(...args: any[]): any

is2

  • is2(...args: any[]): any

is3

  • is3(...args: any[]): any

kBEG

  • kBEG(...args: any[]): any

kCAN

  • kCAN(...args: any[]): any

kCMD

  • kCMD(...args: any[]): any

kCPY

  • kCPY(...args: any[]): any

kCRT

  • kCRT(...args: any[]): any

kDC

  • kDC(...args: any[]): any

kDL

  • kDL(...args: any[]): any

kEND

  • kEND(...args: any[]): any

kEOL

  • kEOL(...args: any[]): any

kEXT

  • kEXT(...args: any[]): any

kFND

  • kFND(...args: any[]): any

kHLP

  • kHLP(...args: any[]): any

kHOM

  • kHOM(...args: any[]): any

kIC

  • kIC(...args: any[]): any

kLFT

  • kLFT(...args: any[]): any

kMOV

  • kMOV(...args: any[]): any

kMSG

  • kMSG(...args: any[]): any

kNXT

  • kNXT(...args: any[]): any

kOPT

  • kOPT(...args: any[]): any

kPRT

  • kPRT(...args: any[]): any

kPRV

  • kPRV(...args: any[]): any

kRDO

  • kRDO(...args: any[]): any

kRES

  • kRES(...args: any[]): any

kRIT

  • kRIT(...args: any[]): any

kRPL

  • kRPL(...args: any[]): any

kSAV

  • kSAV(...args: any[]): any

kSPD

  • kSPD(...args: any[]): any

kUND

  • kUND(...args: any[]): any

ka1

  • ka1(...args: any[]): any

ka3

  • ka3(...args: any[]): any

kb2

  • kb2(...args: any[]): any

kbeg

  • kbeg(...args: any[]): any

kbs

  • kbs(): boolean

kc1

  • kc1(...args: any[]): any

kc3

  • kc3(...args: any[]): any

kcan

  • kcan(...args: any[]): any

kcbt

  • kcbt(...args: any[]): any

kclo

  • kclo(...args: any[]): any

kclr

  • kclr(...args: any[]): any

kcmd

  • kcmd(...args: any[]): any

kcpy

  • kcpy(...args: any[]): any

kcrt

  • kcrt(...args: any[]): any

kctab

  • kctab(...args: any[]): any

kcub1

  • kcub1(...args: any[]): any

kcud1

  • kcud1(...args: any[]): any

kcuf1

  • kcuf1(...args: any[]): any

kcuu1

  • kcuu1(...args: any[]): any

kdch1

  • kdch1(...args: any[]): any

kdl1

  • kdl1(...args: any[]): any

ked

  • ked(...args: any[]): any

kel

  • kel(...args: any[]): any

kend

  • kend(...args: any[]): any

kent

  • kent(...args: any[]): any

kext

  • kext(...args: any[]): any

key

key_a1

  • key_a1(...args: any[]): any

key_a3

  • key_a3(...args: any[]): any

key_b2

  • key_b2(...args: any[]): any

key_backspace

  • key_backspace(...args: any[]): any

key_beg

  • key_beg(...args: any[]): any

key_btab

  • key_btab(...args: any[]): any

key_c1

  • key_c1(...args: any[]): any

key_c3

  • key_c3(...args: any[]): any

key_cancel

  • key_cancel(...args: any[]): any

key_catab

  • key_catab(...args: any[]): any

key_clear

  • key_clear(...args: any[]): any

key_close

  • key_close(...args: any[]): any

key_command

  • key_command(...args: any[]): any

key_copy

  • key_copy(...args: any[]): any

key_create

  • key_create(...args: any[]): any

key_ctab

  • key_ctab(...args: any[]): any

key_dc

  • key_dc(...args: any[]): any

key_dl

  • key_dl(...args: any[]): any

key_down

  • key_down(...args: any[]): any

key_eic

  • key_eic(...args: any[]): any

key_end

  • key_end(...args: any[]): any

key_enter

  • key_enter(...args: any[]): any

key_eol

  • key_eol(...args: any[]): any

key_eos

  • key_eos(...args: any[]): any

key_exit

  • key_exit(...args: any[]): any

key_f0

  • key_f0(...args: any[]): any

key_f1

  • key_f1(...args: any[]): any

key_f10

  • key_f10(...args: any[]): any

key_f11

  • key_f11(...args: any[]): any

key_f12

  • key_f12(...args: any[]): any

key_f13

  • key_f13(...args: any[]): any

key_f14

  • key_f14(...args: any[]): any

key_f15

  • key_f15(...args: any[]): any

key_f16

  • key_f16(...args: any[]): any

key_f17

  • key_f17(...args: any[]): any

key_f18

  • key_f18(...args: any[]): any

key_f19

  • key_f19(...args: any[]): any

key_f2

  • key_f2(...args: any[]): any

key_f20

  • key_f20(...args: any[]): any

key_f21

  • key_f21(...args: any[]): any

key_f22

  • key_f22(...args: any[]): any

key_f23

  • key_f23(...args: any[]): any

key_f24

  • key_f24(...args: any[]): any

key_f25

  • key_f25(...args: any[]): any

key_f26

  • key_f26(...args: any[]): any

key_f27

  • key_f27(...args: any[]): any

key_f28

  • key_f28(...args: any[]): any

key_f29

  • key_f29(...args: any[]): any

key_f3

  • key_f3(...args: any[]): any

key_f30

  • key_f30(...args: any[]): any

key_f31

  • key_f31(...args: any[]): any

key_f32

  • key_f32(...args: any[]): any

key_f33

  • key_f33(...args: any[]): any

key_f34

  • key_f34(...args: any[]): any

key_f35

  • key_f35(...args: any[]): any

key_f36

  • key_f36(...args: any[]): any

key_f37

  • key_f37(...args: any[]): any

key_f38

  • key_f38(...args: any[]): any

key_f39

  • key_f39(...args: any[]): any

key_f4

  • key_f4(...args: any[]): any

key_f40

  • key_f40(...args: any[]): any

key_f41

  • key_f41(...args: any[]): any

key_f42

  • key_f42(...args: any[]): any

key_f43

  • key_f43(...args: any[]): any

key_f44

  • key_f44(...args: any[]): any

key_f45

  • key_f45(...args: any[]): any

key_f46

  • key_f46(...args: any[]): any

key_f47

  • key_f47(...args: any[]): any

key_f48

  • key_f48(...args: any[]): any

key_f49

  • key_f49(...args: any[]): any

key_f5

  • key_f5(...args: any[]): any

key_f50

  • key_f50(...args: any[]): any

key_f51

  • key_f51(...args: any[]): any

key_f52

  • key_f52(...args: any[]): any

key_f53

  • key_f53(...args: any[]): any

key_f54

  • key_f54(...args: any[]): any

key_f55

  • key_f55(...args: any[]): any

key_f56

  • key_f56(...args: any[]): any

key_f57

  • key_f57(...args: any[]): any

key_f58

  • key_f58(...args: any[]): any

key_f59

  • key_f59(...args: any[]): any

key_f6

  • key_f6(...args: any[]): any

key_f60

  • key_f60(...args: any[]): any

key_f61

  • key_f61(...args: any[]): any

key_f62

  • key_f62(...args: any[]): any

key_f63

  • key_f63(...args: any[]): any

key_f7

  • key_f7(...args: any[]): any

key_f8

  • key_f8(...args: any[]): any

key_f9

  • key_f9(...args: any[]): any

key_find

  • key_find(...args: any[]): any

key_help

  • key_help(...args: any[]): any

key_home

  • key_home(...args: any[]): any

key_ic

  • key_ic(...args: any[]): any

key_il

  • key_il(...args: any[]): any

key_left

  • key_left(...args: any[]): any

key_ll

  • key_ll(...args: any[]): any

key_mark

  • key_mark(...args: any[]): any

key_message

  • key_message(...args: any[]): any

key_mouse

  • key_mouse(...args: any[]): any

key_move

  • key_move(...args: any[]): any

key_next

  • key_next(...args: any[]): any

key_npage

  • key_npage(...args: any[]): any

key_open

  • key_open(...args: any[]): any

key_options

  • key_options(...args: any[]): any

key_ppage

  • key_ppage(...args: any[]): any

key_previous

  • key_previous(...args: any[]): any

key_print

  • key_print(...args: any[]): any

key_redo

  • key_redo(...args: any[]): any

key_reference

  • key_reference(...args: any[]): any

key_refresh

  • key_refresh(...args: any[]): any

key_replace

  • key_replace(...args: any[]): any

key_restart

  • key_restart(...args: any[]): any

key_resume

  • key_resume(...args: any[]): any

key_right

  • key_right(...args: any[]): any

key_save

  • key_save(...args: any[]): any

key_sbeg

  • key_sbeg(...args: any[]): any

key_scancel

  • key_scancel(...args: any[]): any

key_scommand

  • key_scommand(...args: any[]): any

key_scopy

  • key_scopy(...args: any[]): any

key_screate

  • key_screate(...args: any[]): any

key_sdc

  • key_sdc(...args: any[]): any

key_sdl

  • key_sdl(...args: any[]): any

key_select

  • key_select(...args: any[]): any

key_send

  • key_send(...args: any[]): any

key_seol

  • key_seol(...args: any[]): any

key_sexit

  • key_sexit(...args: any[]): any

key_sf

  • key_sf(...args: any[]): any

key_sfind

  • key_sfind(...args: any[]): any

key_shelp

  • key_shelp(...args: any[]): any

key_shome

  • key_shome(...args: any[]): any

key_sic

  • key_sic(...args: any[]): any

key_sleft

  • key_sleft(...args: any[]): any

key_smessage

  • key_smessage(...args: any[]): any

key_smove

  • key_smove(...args: any[]): any

key_snext

  • key_snext(...args: any[]): any

key_soptions

  • key_soptions(...args: any[]): any

key_sprevious

  • key_sprevious(...args: any[]): any

key_sprint

  • key_sprint(...args: any[]): any

key_sr

  • key_sr(...args: any[]): any

key_sredo

  • key_sredo(...args: any[]): any

key_sreplace

  • key_sreplace(...args: any[]): any

key_sright

  • key_sright(...args: any[]): any

key_srsume

  • key_srsume(...args: any[]): any

key_ssave

  • key_ssave(...args: any[]): any

key_ssuspend

  • key_ssuspend(...args: any[]): any

key_stab

  • key_stab(...args: any[]): any

key_sundo

  • key_sundo(...args: any[]): any

key_suspend

  • key_suspend(...args: any[]): any

key_undo

  • key_undo(...args: any[]): any

key_up

  • key_up(...args: any[]): any

keypad_local

  • keypad_local(...args: any[]): any

keypad_xmit

  • keypad_xmit(...args: any[]): any

kf0

  • kf0(...args: any[]): any

kf1

  • kf1(...args: any[]): any

kf10

  • kf10(...args: any[]): any

kf11

  • kf11(...args: any[]): any

kf12

  • kf12(...args: any[]): any

kf13

  • kf13(...args: any[]): any

kf14

  • kf14(...args: any[]): any

kf15

  • kf15(...args: any[]): any

kf16

  • kf16(...args: any[]): any

kf17

  • kf17(...args: any[]): any

kf18

  • kf18(...args: any[]): any

kf19

  • kf19(...args: any[]): any

kf2

  • kf2(...args: any[]): any

kf20

  • kf20(...args: any[]): any

kf21

  • kf21(...args: any[]): any

kf22

  • kf22(...args: any[]): any

kf23

  • kf23(...args: any[]): any

kf24

  • kf24(...args: any[]): any

kf25

  • kf25(...args: any[]): any

kf26

  • kf26(...args: any[]): any

kf27

  • kf27(...args: any[]): any

kf28

  • kf28(...args: any[]): any

kf29

  • kf29(...args: any[]): any

kf3

  • kf3(...args: any[]): any

kf30

  • kf30(...args: any[]): any

kf31

  • kf31(...args: any[]): any

kf32

  • kf32(...args: any[]): any

kf33

  • kf33(...args: any[]): any

kf34

  • kf34(...args: any[]): any

kf35

  • kf35(...args: any[]): any

kf36

  • kf36(...args: any[]): any

kf37

  • kf37(...args: any[]): any

kf38

  • kf38(...args: any[]): any

kf39

  • kf39(...args: any[]): any

kf4

  • kf4(...args: any[]): any

kf40

  • kf40(...args: any[]): any

kf41

  • kf41(...args: any[]): any

kf42

  • kf42(...args: any[]): any

kf43

  • kf43(...args: any[]): any

kf44

  • kf44(...args: any[]): any

kf45

  • kf45(...args: any[]): any

kf46

  • kf46(...args: any[]): any

kf47

  • kf47(...args: any[]): any

kf48

  • kf48(...args: any[]): any

kf49

  • kf49(...args: any[]): any

kf5

  • kf5(...args: any[]): any

kf50

  • kf50(...args: any[]): any

kf51

  • kf51(...args: any[]): any

kf52

  • kf52(...args: any[]): any

kf53

  • kf53(...args: any[]): any

kf54

  • kf54(...args: any[]): any

kf55

  • kf55(...args: any[]): any

kf56

  • kf56(...args: any[]): any

kf57

  • kf57(...args: any[]): any

kf58

  • kf58(...args: any[]): any

kf59

  • kf59(...args: any[]): any

kf6

  • kf6(...args: any[]): any

kf60

  • kf60(...args: any[]): any

kf61

  • kf61(...args: any[]): any

kf62

  • kf62(...args: any[]): any

kf63

  • kf63(...args: any[]): any

kf7

  • kf7(...args: any[]): any

kf8

  • kf8(...args: any[]): any

kf9

  • kf9(...args: any[]): any

kfnd

  • kfnd(...args: any[]): any

khlp

  • khlp(...args: any[]): any

khome

  • khome(...args: any[]): any

khts

  • khts(...args: any[]): any

kich1

  • kich1(...args: any[]): any

kil1

  • kil1(...args: any[]): any

kind

  • kind(...args: any[]): any

kll

  • kll(...args: any[]): any

kmous

  • kmous(...args: any[]): any

kmov

  • kmov(...args: any[]): any

kmrk

  • kmrk(...args: any[]): any

kmsg

  • kmsg(...args: any[]): any

knp

  • knp(...args: any[]): any

knxt

  • knxt(...args: any[]): any

kopn

  • kopn(...args: any[]): any

kopt

  • kopt(...args: any[]): any

kpp

  • kpp(...args: any[]): any

kprt

  • kprt(...args: any[]): any

kprv

  • kprv(...args: any[]): any

krdo

  • krdo(...args: any[]): any

kref

  • kref(...args: any[]): any

kres

  • kres(...args: any[]): any

krfr

  • krfr(...args: any[]): any

kri

  • kri(...args: any[]): any

krmir

  • krmir(...args: any[]): any

krpl

  • krpl(...args: any[]): any

krst

  • krst(...args: any[]): any

ksav

  • ksav(...args: any[]): any

kslt

  • kslt(...args: any[]): any

kspd

  • kspd(...args: any[]): any

ktbc

  • ktbc(...args: any[]): any

kund

  • kund(...args: any[]): any

lab_f0

  • lab_f0(...args: any[]): any

lab_f1

  • lab_f1(...args: any[]): any

lab_f10

  • lab_f10(...args: any[]): any

lab_f2

  • lab_f2(...args: any[]): any

lab_f3

  • lab_f3(...args: any[]): any

lab_f4

  • lab_f4(...args: any[]): any

lab_f5

  • lab_f5(...args: any[]): any

lab_f6

  • lab_f6(...args: any[]): any

lab_f7

  • lab_f7(...args: any[]): any

lab_f8

  • lab_f8(...args: any[]): any

lab_f9

  • lab_f9(...args: any[]): any

label_format

  • label_format(...args: any[]): any

label_off

  • label_off(...args: any[]): any

label_on

  • label_on(...args: any[]): any

left

  • left(n?: number): boolean

lf0

  • lf0(...args: any[]): any

lf1

  • lf1(...args: any[]): any

lf10

  • lf10(...args: any[]): any

lf2

  • lf2(...args: any[]): any

lf3

  • lf3(...args: any[]): any

lf4

  • lf4(...args: any[]): any

lf5

  • lf5(...args: any[]): any

lf6

  • lf6(...args: any[]): any

lf7

  • lf7(...args: any[]): any

lf8

  • lf8(...args: any[]): any

lf9

  • lf9(...args: any[]): any

lineHeight

  • lineHeight(): boolean

linePosAbsolute

  • linePosAbsolute(param?: number): boolean

linefeed_if_not_lf

  • linefeed_if_not_lf(...args: any[]): any

listen

  • listen(): void

listenerCount

  • listenerCount(type: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

ll

  • ll(...args: any[]): any

loadLEDs

  • loadLEDs(param?: number): boolean

log

  • log(...args: any[]): boolean

lpi

  • lpi(...args: any[]): any

lrestoreCursor

  • lrestoreCursor(key?: string, hide?: boolean): void

lsaveCursor

  • lsaveCursor(key?: string): void

manipulateWindow

  • ``` CSI Ps ; Ps ; Ps t Window manipulation (from dtterm, as well as extensions). These controls may be disabled using the allowWindowOps resource. Valid values for the first (and any additional parameters) are: ` Ps = 1 -> De-iconify window. Ps = 2 -> Iconify window. Ps = 3 ; x ; y -> Move window to [x, y]. Ps = 4 ; height ; width -> Resize the xterm window to height and width in pixels. Ps = 5 -> Raise the xterm window to the front of the stack- ing order. Ps = 6 -> Lower the xterm window to the bottom of the stacking order. Ps = 7 -> Refresh the xterm window. Ps = 8 ; height ; width -> Resize the text area to [height;width] in characters. Ps = 9 ; 0 -> Restore maximized window. Ps = 9 ; 1 -> Maximize window (i.e., resize to screen size). Ps = 1 0 ; 0 -> Undo full-screen mode. Ps = 1 0 ; 1 -> Change to full-screen. Ps = 1 1 -> Report xterm window state. If the xterm window is open (non-iconified), it returns CSI 1 t . If the xterm window is iconified, it returns CSI 2 t . Ps = 1 3 -> Report xterm window position. Result is CSI 3 ; x ; y t Ps = 1 4 -> Report xterm window in pixels. Result is CSI 4 ; height ; width t Ps = 1 8 -> Report the size of the text area in characters. Result is CSI 8 ; height ; width t Ps = 1 9 -> Report the size of the screen in characters. Result is CSI 9 ; height ; width t Ps = 2 0 -> Report xterm window's icon label. Result is OSC L label ST Ps = 2 1 -> Report xterm window's title. Result is OSC l label ST Ps = 2 2 ; 0 -> Save xterm icon and window title on stack. Ps = 2 2 ; 1 -> Save xterm icon title on stack. Ps = 2 2 ; 2 -> Save xterm window title on stack. Ps = 2 3 ; 0 -> Restore xterm icon and window title from stack. Ps = 2 3 ; 1 -> Restore xterm icon title from stack. Ps = 2 3 ; 2 -> Restore xterm window title from stack. Ps >= 2 4 -> Resize to Ps lines (DECSLPP). Ps >= 2 4 -> Resize to Ps lines (DECSLPP).`` Example call: ``` program.manipulateWindow(18, function(err:any, data:any) { program.log('manipulateWindow', data); });

    Parameters

    Returns boolean

  • Parameters

    Returns boolean

mc

  • mc(...args: string[]): boolean

mc0

  • mc0(): boolean

mc4

  • mc4(): boolean

mc5

  • mc5(): boolean

mc5p

  • mc5p(): boolean

mcub

  • mcub(...args: any[]): any

mcub1

  • mcub1(...args: any[]): any

mcud

  • mcud(...args: any[]): any

mcud1

  • mcud1(...args: any[]): any

mcuf

  • mcuf(...args: any[]): any

mcuf1

  • mcuf1(...args: any[]): any

mcuu

  • mcuu(...args: any[]): any

mcuu1

  • mcuu1(...args: any[]): any

mediaCopy

  • mediaCopy(...args: string[]): boolean

memory_lock

  • memory_lock(...args: any[]): any

memory_unlock

  • memory_unlock(...args: any[]): any

meta_off

  • meta_off(...args: any[]): any

meta_on

  • meta_on(...args: any[]): any

mgc

  • mgc(...args: any[]): any

mhpa

  • mhpa(...args: any[]): any

micro_column_address

  • micro_column_address(...args: any[]): any

micro_down

  • micro_down(...args: any[]): any

micro_left

  • micro_left(...args: any[]): any

micro_right

  • micro_right(...args: any[]): any

micro_row_address

  • micro_row_address(...args: any[]): any

micro_up

  • micro_up(...args: any[]): any

minfo

  • minfo(...args: any[]): any

mouse_info

  • mouse_info(...args: any[]): any

move

  • move(x: number, y: number): boolean

mrcup

  • mrcup(...args: any[]): any

mvpa

  • mvpa(...args: any[]): any

nel

  • nel(...args: any[]): any

newline

  • newline(): boolean

nextLine

  • nextLine(): boolean

nl

  • nl(): boolean

normalBuffer

  • normalBuffer(): boolean

nul

  • nul(): boolean

oc

  • oc(...args: any[]): any

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

omove

  • omove(x: number, y: number): void

on

  • on(e: "mouse", c: function): this
  • on(e: "resize", c: function): this
  • on(e: "focus", c: function): this
  • on(e: "blur", c: function): this
  • on(e: "keypress", c: KeyEventListener): this
  • on(event: "warning", callback: function): this
  • on(e: string, c: function): this
  • Triggered when native events in the host terminal window .

    Parameters

    • e: "mouse"
    • c: function

    Returns this

  • Triggered when the terminal window is resized.

    Parameters

    • e: "resize"
    • c: function
        • (e: object): void
        • Parameters

          • e: object
            • cols: number
            • rows: number
            • winch: boolean

          Returns void

    Returns this

  • Triggered when the terminal window gains focus n the host window manager. For exmmple when the user switchst form another application to the terminal with ctrl-tab. Notice that these are native events, ocurring outside the terminal application.

    Parameters

    • e: "focus"
    • c: function
        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns this

  • Triggered when the terminal window loose focus host window manager. For exmmple when the user switchs from the shell to another form another application . Notice that these are native events, ocurring outside the terminal application.

    Parameters

    • e: "blur"
    • c: function
        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns this

  • Triggered on any key press. If you need to listen only for particular keys, use 'key'. For example:

    program.on('key tab', (ch, key)=>{})

    Parameters

    Returns this

  • Received when blessed notices something untoward (output is not a tty, terminfo not found, etc).

    Parameters

    • event: "warning"
    • callback: function
        • (text: string): void
        • Parameters

          • text: string

          Returns void

    Returns this

  • Parameters

    • e: string
    • c: function
        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

onceKey

op

  • op(...args: any[]): any

order_of_pins

  • order_of_pins(...args: any[]): any

orig_colors

  • orig_colors(...args: any[]): any

orig_pair

  • orig_pair(...args: any[]): any

other_non_function_keys

  • other_non_function_keys(...args: any[]): any

out

  • out(param: string, ...args: any[]): boolean

p0

  • p0(): boolean

pad

  • pad(...args: any[]): any

pad_char

  • pad_char(...args: any[]): any

parm_dch

  • parm_dch(...args: any[]): any

parm_delete_line

  • parm_delete_line(...args: any[]): any

parm_down_cursor

  • parm_down_cursor(...args: any[]): any

parm_down_micro

  • parm_down_micro(...args: any[]): any

parm_ich

  • parm_ich(...args: any[]): any

parm_index

  • parm_index(...args: any[]): any

parm_insert_line

  • parm_insert_line(...args: any[]): any

parm_left_cursor

  • parm_left_cursor(...args: any[]): any

parm_left_micro

  • parm_left_micro(...args: any[]): any

parm_right_cursor

  • parm_right_cursor(...args: any[]): any

parm_right_micro

  • parm_right_micro(...args: any[]): any

parm_rindex

  • parm_rindex(...args: any[]): any

parm_up_cursor

  • parm_up_cursor(...args: any[]): any

parm_up_micro

  • parm_up_micro(...args: any[]): any

parseTerminfo

  • parseTerminfo(data: any, file: string): TputInfo

pause

pc_term_options

  • pc_term_options(...args: any[]): any

pctrm

  • pctrm(...args: any[]): any

pf

  • pf(): boolean

pfkey

  • pfkey(...args: any[]): any

pfloc

  • pfloc(...args: any[]): any

pfx

  • pfx(...args: any[]): any

pfxl

  • pfxl(...args: any[]): any

pkey_key

  • pkey_key(...args: any[]): any

pkey_local

  • pkey_local(...args: any[]): any

pkey_plab

  • pkey_plab(...args: any[]): any

pkey_xmit

  • pkey_xmit(...args: any[]): any

plab_norm

  • plab_norm(...args: any[]): any

pln

  • pln(...args: any[]): any

po

  • po(): boolean

porder

  • porder(...args: any[]): any

pos

  • pos(row?: number, col?: number): boolean

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

print

  • print(text: string, attr?: number): boolean

print_screen

  • print_screen(): boolean

prot

  • prot(...args: any[]): any

prtr_non

  • prtr_non(): boolean

prtr_off

  • prtr_off(): boolean

prtr_on

  • prtr_on(): boolean

ps

  • ps(): boolean

pulse

  • pulse(...args: any[]): any

qdial

  • qdial(...args: any[]): any

quick_dial

  • quick_dial(...args: any[]): any

rawListeners

  • rawListeners(event: string | symbol): Function[]

rbim

  • rbim(...args: any[]): any

rc

  • rc(key?: string, hide?: boolean): boolean

rcA

  • rcA(): boolean

rcsd

  • rcsd(...args: any[]): any

readTerminfo

  • readTerminfo(term: string): string

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeKey

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

remove_clock

  • remove_clock(...args: any[]): any

rep

  • rep(param?: number): boolean

repeat

  • repeat(ch: string, i?: number): string

repeatPrecedingCharacter

  • repeatPrecedingCharacter(param?: number): boolean

repeat_char

  • repeat_char(...args: any[]): any

req_for_input

  • req_for_input(...args: any[]): any

req_mouse_pos

reqmp

requestAnsiMode

  • requestAnsiMode(param?: number): boolean

requestLocatorPosition

  • ``` CSI Ps ' | Request Locator Position (DECRQLP). Valid values for the parameter are: Ps = 0 , 1 or omitted -> transmit a single DECLRP locator report.

    If Locator Reporting has been enabled by a DECELR, xterm will respond with a DECLRP Locator Report. This report is also generated on button up and down events if they have been enabled with a DECSLE, or when the locator is detected outside of a filter rectangle, if filter rectangles have been enabled with a DECEFR.

    -> CSI Pe ; Pb ; Pr ; Pc ; Pp & w

    Parameters are [event;button;row;column;page]. Valid values for the event: Pe = 0 -> locator unavailable - no other parameters sent. Pe = 1 -> request - xterm received a DECRQLP. Pe = 2 -> left button down. Pe = 3 -> left button up. Pe = 4 -> middle button down. Pe = 5 -> middle button up. Pe = 6 -> right button down. Pe = 7 -> right button up. Pe = 8 -> M4 button down. Pe = 9 -> M4 button up. Pe = 1 0 -> locator outside filter rectangle. button'' parameter is a bitmask indicating which buttons are pressed: Pb = 0 <- no buttons down. Pb & 1 <- right button down. Pb & 2 <- middle button down. Pb & 4 <- left button down. Pb & 8 <- M4 button down.row'' andcolumn'' parameters are the coordinates of the locator position in the xterm window, encoded as ASCII deci- mal. Thepage'' parameter is not used by xterm, and will be omit- ted.

    Parameters

    Returns boolean

requestParameters

  • requestParameters(param?: number): boolean
  • CSI Ps x  Request Terminal Parameters (DECREQTPARM).
    if Ps is a "0" (default) or "1", and xterm is emulating VT100,
    the control sequence elicits a response of the same form whose
    parameters describe the terminal:
    Ps -> the given Ps incremented by 2.
    Pn = 1  <- no parity.
    Pn = 1  <- eight bits.
    Pn = 1  <- 2  8  transmit 38.4k baud.
    Pn = 1  <- 2  8  receive 38.4k baud.
    Pn = 1  <- clock multiplier.
    Pn = 0  <- STP flags.

    Parameters

    • Optional param: number

    Returns boolean

requestPrivateMode

  • requestPrivateMode(param?: number): boolean

reset

  • reset(): boolean

resetColors

  • resetColors(param?: string): boolean

resetCursor

  • resetCursor(): boolean

resetMode

  • resetMode(...args: string[]): boolean
  • CSI Pm l  Reset Mode (RM).
    Ps = 2  -> Keyboard Action Mode (AM).
    Ps = 4  -> Replace Mode (IRM).
    Ps = 1 2  -> Send/receive (SRM).
    Ps = 2 0  -> Normal Linefeed (LNM).
    CSI ? Pm l
    DEC Private Mode Reset (DECRST).
    Ps = 1  -> Normal Cursor Keys (DECCKM).
    Ps = 2  -> Designate VT52 mode (DECANM).
    Ps = 3  -> 80 Column Mode (DECCOLM).
    Ps = 4  -> Jump (Fast) Scroll (DECSCLM).
    Ps = 5  -> Normal Video (DECSCNM).
    Ps = 6  -> Normal Cursor Mode (DECOM).
    Ps = 7  -> No Wraparound Mode (DECAWM).
    Ps = 8  -> No Auto-repeat Keys (DECARM).
    Ps = 9  -> Don't send Mouse X & Y on button press.
    Ps = 1 0  -> Hide toolbar (rxvt).
    Ps = 1 2  -> Stop Blinking Cursor (att610).
    Ps = 1 8  -> Don't print form feed (DECPFF).
    Ps = 1 9  -> Limit print to scrolling region (DECPEX).
    Ps = 2 5  -> Hide Cursor (DECTCEM).
    Ps = 3 0  -> Don't show scrollbar (rxvt).
    Ps = 3 5  -> Disable font-shifting functions (rxvt).
    Ps = 4 0  -> Disallow 80 -> 132 Mode.
    Ps = 4 1  -> No more(1) fix (see curses resource).
    Ps = 4 2  -> Disable Nation Replacement Character sets (DEC-
    NRCM).
    Ps = 4 4  -> Turn Off Margin Bell.
    Ps = 4 5  -> No Reverse-wraparound Mode.
    Ps = 4 6  -> Stop Logging.  (This is normally disabled by a
    compile-time option).
    Ps = 4 7  -> Use Normal Screen Buffer.
    Ps = 6 6  -> Numeric keypad (DECNKM).
    Ps = 6 7  -> Backarrow key sends delete (DECBKM).
    Ps = 1 0 0 0  -> Don't send Mouse X & Y on button press and
    release.  See the section Mouse Tracking.
    Ps = 1 0 0 1  -> Don't use Hilite Mouse Tracking.
    Ps = 1 0 0 2  -> Don't use Cell Motion Mouse Tracking.
    Ps = 1 0 0 3  -> Don't use All Motion Mouse Tracking.
    Ps = 1 0 0 4  -> Don't send FocusIn/FocusOut events.
    Ps = 1 0 0 5  -> Disable Extended Mouse Mode.
    Ps = 1 0 1 0  -> Don't scroll to bottom on tty output
    (rxvt).
    Ps = 1 0 1 1  -> Don't scroll to bottom on key press (rxvt).
    Ps = 1 0 3 4  -> Don't interpret "meta" key.  (This disables
    the eightBitInput resource).
    Ps = 1 0 3 5  -> Disable special modifiers for Alt and Num-
    Lock keys.  (This disables the numLock resource).
    Ps = 1 0 3 6  -> Don't send ESC  when Meta modifies a key.
    (This disables the metaSendsEscape resource).
    Ps = 1 0 3 7  -> Send VT220 Remove from the editing-keypad
    Delete key.
    Ps = 1 0 3 9  -> Don't send ESC  when Alt modifies a key.
    (This disables the altSendsEscape resource).
    Ps = 1 0 4 0  -> Do not keep selection when not highlighted.
    (This disables the keepSelection resource).
    Ps = 1 0 4 1  -> Use the PRIMARY selection.  (This disables
    the selectToClipboard resource).
    Ps = 1 0 4 2  -> Disable Urgency window manager hint when
    Control-G is received.  (This disables the bellIsUrgent
    resource).
    Ps = 1 0 4 3  -> Disable raising of the window when Control-
    G is received.  (This disables the popOnBell resource).
    Ps = 1 0 4 7  -> Use Normal Screen Buffer, clearing screen
    first if in the Alternate Screen.  (This may be disabled by
    the titeInhibit resource).
    Ps = 1 0 4 8  -> Restore cursor as in DECRC.  (This may be
    disabled by the titeInhibit resource).
    Ps = 1 0 4 9  -> Use Normal Screen Buffer and restore cursor
    as in DECRC.  (This may be disabled by the titeInhibit
    resource).  This combines the effects of the 1 0 4 7  and 1 0
    4 8  modes.  Use this with terminfo-based applications rather
    than the 4 7  mode.
    Ps = 1 0 5 0  -> Reset terminfo/termcap function-key mode.
    Ps = 1 0 5 1  -> Reset Sun function-key mode.
    Ps = 1 0 5 2  -> Reset HP function-key mode.
    Ps = 1 0 5 3  -> Reset SCO function-key mode.
    Ps = 1 0 6 0  -> Reset legacy keyboard emulation (X11R6).
    Ps = 1 0 6 1  -> Reset keyboard emulation to Sun/PC style.
    Ps = 2 0 0 4  -> Reset bracketed paste mode.

    Parameters

    • Rest ...args: string[]

    Returns boolean

resetTitleModes

  • resetTitleModes(...args: string[]): boolean
  • CSI > Ps; Ps T
    Reset one or more features of the title modes to the default
    value.  Normally, "reset" disables the feature.  It is possi-
    ble to disable the ability to reset features by compiling a
    different default for the title modes into xterm.
    Ps = 0  -> Do not set window/icon labels using hexadecimal.
    Ps = 1  -> Do not query window/icon labels using hexadeci-
    mal.
    Ps = 2  -> Do not set window/icon labels using UTF-8.
    Ps = 3  -> Do not query window/icon labels using UTF-8.
    (See discussion of "Title Modes").

    Parameters

    • Rest ...args: string[]

    Returns boolean

reset_1string

  • reset_1string(...args: any[]): any

reset_2string

  • reset_2string(...args: any[]): any

reset_3string

  • reset_3string(...args: any[]): any

reset_file

  • reset_file(...args: any[]): any

response

  • response(name: string, text: string, callback: Function, noBypass?: boolean): boolean
  • response(name: string, callback?: Function): boolean

restoreCursor

  • restoreCursor(key?: string, hide?: boolean): boolean

restoreCursorA

  • restoreCursorA(): boolean

restorePrivateValues

  • restorePrivateValues(...args: string[]): boolean
  • CSI ? Pm r
    Restore DEC Private Mode Values.  The value of Ps previously
    saved is restored.  Ps values are the same as for DECSET.

    Parameters

    • Rest ...args: string[]

    Returns boolean

restore_cursor

  • restore_cursor(...args: any[]): any

return

  • return(): boolean

rev

  • rev(...args: any[]): any

reverse

  • reverse(): boolean

reverseAttrInRectangle

  • reverseAttrInRectangle(...args: string[]): boolean

reverseIndex

  • reverseIndex(): boolean

rf

  • rf(...args: any[]): any

rfi

  • rfi(...args: any[]): any

ri

  • ri(): boolean

right

  • right(n?: number): boolean

rin

  • rin(...args: any[]): any

ritm

  • ritm(...args: any[]): any

rlm

  • rlm(...args: any[]): any

rm

  • rm(...args: string[]): boolean

rmacs

  • rmacs(): boolean

rmam

  • rmam(...args: any[]): any

rmclk

  • rmclk(...args: any[]): any

rmcup

  • rmcup(): boolean

rmdc

  • rmdc(...args: any[]): any

rmicm

  • rmicm(...args: any[]): any

rmir

  • rmir(...args: any[]): any

rmkx

  • rmkx(...args: any[]): any

rmln

  • rmln(...args: any[]): any

rmm

  • rmm(...args: any[]): any

rmove

  • rmove(x: number, y: number): void

rmp

  • rmp(...args: any[]): any

rmpch

  • rmpch(...args: any[]): any

rmsc

  • rmsc(...args: any[]): any

rmso

  • rmso(...args: any[]): any

rmul

  • rmul(...args: any[]): any

rmxon

  • rmxon(...args: any[]): any

row_address

  • row_address(...args: any[]): any

rs1

  • rs1(...args: any[]): any

rs2

  • rs2(): boolean

rs3

  • rs3(...args: any[]): any

rsetx

  • rsetx(x: number): boolean

rsety

  • rsety(y: number): boolean

rshm

  • rshm(...args: any[]): any

rsubm

  • rsubm(...args: any[]): any

rsupm

  • rsupm(...args: any[]): any

rum

  • rum(...args: any[]): any

rwidm

  • rwidm(...args: any[]): any

s0ds

  • s0ds(...args: any[]): any

s1ds

  • s1ds(...args: any[]): any

s2ds

  • s2ds(...args: any[]): any

s3ds

  • s3ds(...args: any[]): any

saveCursor

  • saveCursor(key: string): boolean

saveCursorA

  • saveCursorA(): boolean

savePrivateValues

  • savePrivateValues(...args: string[]): boolean

saveReportedCursor

save_cursor

  • save_cursor(...args: any[]): any

sbim

  • sbim(...args: any[]): any

sc

  • sc(key: string): boolean

scA

  • scA(): boolean

scancode_escape

  • scancode_escape(...args: any[]): any

scesa

  • scesa(...args: any[]): any

scesc

  • scesc(...args: any[]): any

sclk

  • sclk(...args: any[]): any

scp

  • scp(...args: any[]): any

scrollDown

  • scrollDown(param?: number): boolean

scrollUp

  • scrollUp(param?: number): boolean

scroll_forward

  • scroll_forward(...args: any[]): any

scroll_reverse

  • scroll_reverse(...args: any[]): any

scs

  • scs(...args: any[]): any

scsd

  • scsd(...args: any[]): any

sd

  • sd(param?: number): boolean

sdrfq

  • sdrfq(...args: any[]): any

selData

  • selData(a: string, b: string): boolean

selectChangeExtent

  • selectChangeExtent(param?: number): boolean
  • ```

    CSI Ps x Select Attribute Change Extent (DECSACE). Ps = 0 -> from start to end position, wrapped. Ps = 1 -> from start to end position, wrapped. Ps = 2 -> rectangle (exact).

    Parameters

    • Optional param: number

    Returns boolean

select_char_set

  • select_char_set(...args: any[]): any

selectiveEraseRectangle

  • selectiveEraseRectangle(...args: string[]): boolean

sendDeviceAttributes

set0_des_seq

  • set0_des_seq(...args: any[]): any

set1_des_seq

  • set1_des_seq(...args: any[]): any

set2_des_seq

  • set2_des_seq(...args: any[]): any

set3_des_seq

  • set3_des_seq(...args: any[]): any

setAttrInRectangle

  • setAttrInRectangle(Pt: number, Pl: number, Pb: number, Pr: number, Ps$: number): boolean
  • CSI Pt; Pl; Pb; Pr; Ps$ r
    Change Attributes in Rectangular Area (DECCARA), VT400 and up.
    Pt; Pl; Pb; Pr denotes the rectangle.
    Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
    NOTE: xterm doesn't enable this code by default.

    Parameters

    • Pt: number
    • Pl: number
    • Pb: number
    • Pr: number
    • Ps$: number

    Returns boolean

setBackground

  • setBackground(color: string, val?: string): boolean
  • set the background color and character for the following writings to the output buffer. Example:

    program.setBackground('green', 'O')
    program.setForeground('red', 'i')
    program.on('mouse', function (data) {
    program.cup(data.y, data.x);
    program.write(' ', 'blue bg');
    program.write('as', 'red fg');
    program.cup(0, 0);
    });

    Parameters

    • color: string
    • Optional val: string

    Returns boolean

setCharProtectionAttr

  • setCharProtectionAttr(param?: number): boolean
  • CSI Ps " q
    Select character protection attribute (DECSCA).  Valid values
    for the parameter:
    Ps = 0  -> DECSED and DECSEL can erase (default).
    Ps = 1  -> DECSED and DECSEL cannot erase.
    Ps = 2  -> DECSED and DECSEL can erase.

    Parameters

    • Optional param: number

    Returns boolean

setConformanceLevel

  • setConformanceLevel(...args: string[]): boolean

setCursorStyle

  • setCursorStyle(cursor: 0 | 1 | 2 | 3 | 4 | "blinkingblock" | "block" | "steady block" | "blinking underline" | "underline" | "steady underline" | "blinking bar" | "bar" | "steady bar"): boolean
  • ``` CSI Ps SP q Set cursor style (DECSCUSR, VT520). Ps = 0 -> blinking block. Ps = 1 -> blinking block (default). Ps = 2 -> steady block. Ps = 3 -> blinking underline. Ps = 4 -> steady underline. ```

    Parameters

    • cursor: 0 | 1 | 2 | 3 | 4 | "blinkingblock" | "block" | "steady block" | "blinking underline" | "underline" | "steady underline" | "blinking bar" | "bar" | "steady bar"

    Returns boolean

setForeground

  • setForeground(color: string, val?: string): boolean
  • set the foreground color and character for the following writings to the output buffer. Example:

    program.setBackground('green', 'O')
    program.setForeground('red', 'i')
    program.on('mouse', function (data) {
    program.cup(data.y, data.x);
    program.write(' ', 'blue bg');
    program.write('as', 'red fg');
    program.cup(0, 0);
    });

    Parameters

    • color: string
    • Optional val: string

    Returns boolean

setG

  • setG(val: number): boolean

setLocatorEvents

  • setLocatorEvents(...args: string[]): boolean

setMarginBellVolume

  • setMarginBellVolume(param?: number): boolean

setMaxListeners

  • setMaxListeners(n: number): this

setMode

  • ``` CSI Pm h Set Mode (SM). Ps = 2 -> Keyboard Action Mode (AM). Ps = 4 -> Insert Mode (IRM). Ps = 1 2 -> Send/receive (SRM). Ps = 2 0 -> Automatic Newline (LNM). CSI ? Pm h DEC Private Mode Set (DECSET). Ps = 1 -> Application Cursor Keys (DECCKM). Ps = 2 -> Designate USASCII for character sets G0-G3 (DECANM), and set VT100 mode. Ps = 3 -> 132 Column Mode (DECCOLM). Ps = 4 -> Smooth (Slow) Scroll (DECSCLM). Ps = 5 -> Reverse Video (DECSCNM). Ps = 6 -> Origin Mode (DECOM). Ps = 7 -> Wraparound Mode (DECAWM). Ps = 8 -> Auto-repeat Keys (DECARM). Ps = 9 -> Send Mouse X & Y on button press. See the sec- tion Mouse Tracking. Ps = 1 0 -> Show toolbar (rxvt). Ps = 1 2 -> Start Blinking Cursor (att610). Ps = 1 8 -> Print form feed (DECPFF). Ps = 1 9 -> Set print extent to full screen (DECPEX). Ps = 2 5 -> Show Cursor (DECTCEM). Ps = 3 0 -> Show scrollbar (rxvt). Ps = 3 5 -> Enable font-shifting functions (rxvt). Ps = 3 8 -> Enter Tektronix Mode (DECTEK). Ps = 4 0 -> Allow 80 -> 132 Mode. Ps = 4 1 -> more(1) fix (see curses resource). Ps = 4 2 -> Enable Nation Replacement Character sets (DECN- RCM). Ps = 4 4 -> Turn On Margin Bell. Ps = 4 5 -> Reverse-wraparound Mode. Ps = 4 6 -> Start Logging. This is normally disabled by a compile-time option. Ps = 4 7 -> Use Alternate Screen Buffer. (This may be dis- abled by the titeInhibit resource). Ps = 6 6 -> Application keypad (DECNKM). Ps = 6 7 -> Backarrow key sends backspace (DECBKM). Ps = 1 0 0 0 -> Send Mouse X & Y on button press and release. See the section Mouse Tracking. Ps = 1 0 0 1 -> Use Hilite Mouse Tracking. Ps = 1 0 0 2 -> Use Cell Motion Mouse Tracking. Ps = 1 0 0 3 -> Use All Motion Mouse Tracking. Ps = 1 0 0 4 -> Send FocusIn/FocusOut events. Ps = 1 0 0 5 -> Enable Extended Mouse Mode. Ps = 1 0 1 0 -> Scroll to bottom on tty output (rxvt). Ps = 1 0 1 1 -> Scroll to bottom on key press (rxvt). Ps = 1 0 3 4 -> Interpret "meta" key, sets eighth bit. (enables the eightBitInput resource). Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num- Lock keys. (This enables the numLock resource). Ps = 1 0 3 6 -> Send ESC when Meta modifies a key. (This enables the metaSendsEscape resource). Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete key. Ps = 1 0 3 9 -> Send ESC when Alt modifies a key. (This enables the altSendsEscape resource). Ps = 1 0 4 0 -> Keep selection even if not highlighted. (This enables the keepSelection resource). Ps = 1 0 4 1 -> Use the CLIPBOARD selection. (This enables the selectToClipboard resource). Ps = 1 0 4 2 -> Enable Urgency window manager hint when Control-G is received. (This enables the bellIsUrgent resource). Ps = 1 0 4 3 -> Enable raising of the window when Control-G is received. (enables the popOnBell resource). Ps = 1 0 4 7 -> Use Alternate Screen Buffer. (This may be disabled by the titeInhibit resource). Ps = 1 0 4 8 -> Save cursor as in DECSC. (This may be dis- abled by the titeInhibit resource). Ps = 1 0 4 9 -> Save cursor as in DECSC and use Alternate Screen Buffer, clearing it first. (This may be disabled by the titeInhibit resource). This combines the effects of the 1 0 4 7 and 1 0 4 8 modes. Use this with terminfo-based applications rather than the 4 7 mode. Ps = 1 0 5 0 -> Set terminfo/termcap function-key mode. Ps = 1 0 5 1 -> Set Sun function-key mode. Ps = 1 0 5 2 -> Set HP function-key mode. Ps = 1 0 5 3 -> Set SCO function-key mode. Ps = 1 0 6 0 -> Set legacy keyboard emulation (X11R6). Ps = 1 0 6 1 -> Set VT220 keyboard emulation. Ps = 2 0 0 4 -> Set bracketed paste mode. Modes: http://vt100.net/docs/vt220-rm/chapter4.html ```

    Example: Show cursor:

    return this.setMode('?25', (error, data)=>{
    
    });

    Parameters

    Returns boolean

setMouse

  • setMouse(opt?: object, enable?: boolean): void
  • Parameters

    • Optional opt: object
      • [s: string]: any
      • Optional allMotion?: boolean
      • Optional decMouse?: boolean
      • Optional gpmMouse?: boolean
      • Optional hiliteTracking?: boolean
      • Optional jsbtermMouse?: boolean
      • Optional normalMouse?: boolean
      • Optional ptermMouse?: boolean
      • Optional sendFocus?: boolean
      • Optional sgrMouse?: boolean
      • Optional urxvtMouse?: boolean
      • Optional utfMode?: boolean
      • Optional vt200Mouse?: boolean
      • Optional x10Mouse?: boolean
    • Optional enable: boolean

    Returns void

setPointerMode

  • setPointerMode(...args: string[]): boolean
  • ``` CSI > Ps p Set resource value pointerMode. This is used by xterm to decide whether to hide the pointer cursor as the user types. Valid values for the parameter: Ps = 0 -> never hide the pointer. Ps = 1 -> hide if the mouse tracking mode is not enabled. Ps = 2 -> always hide the pointer. If no parameter is given, xterm uses the default, which is 1 .

    Parameters

    • Rest ...args: string[]

    Returns boolean

setResources

  • setResources(...args: string[]): boolean

setScrollRegion

  • setScrollRegion(top: number, bottom: number): boolean
  • CSI Ps ; Ps r
    Set Scrolling Region [top;bottom] (default = full size of win-
    dow) (DECSTBM).
    CSI ? Pm r

    Parameters

    • top: number
    • bottom: number

    Returns boolean

setTerminal

  • setTerminal(terminal: string): void

setTitle

  • setTitle(title: string): boolean

setTitleModeFeature

  • setTitleModeFeature(...args: string[]): boolean
  • Set one or more features of the title modes.  Each parameter
    enables a single feature.
    Ps = 0  -> Set window/icon labels using hexadecimal.
    Ps = 1  -> Query window/icon labels using hexadecimal.
    Ps = 2  -> Set window/icon labels using UTF-8.
    Ps = 3  -> Query window/icon labels using UTF-8.  (See dis-
    cussion of "Title Modes")
    XXX VTE bizarelly echos this:

    Parameters

    • Rest ...args: string[]

    Returns boolean

setWarningBellVolume

  • setWarningBellVolume(param?: number): boolean

set_a_attributes

  • set_a_attributes(...args: any[]): any

set_a_background

  • set_a_background(...args: any[]): any

set_a_foreground

  • set_a_foreground(...args: any[]): any

set_attributes

  • set_attributes(...args: any[]): any

set_background

  • set_background(...args: any[]): any

set_bottom_margin

  • set_bottom_margin(...args: any[]): any

set_bottom_margin_parm

  • set_bottom_margin_parm(...args: any[]): any

set_clock

  • set_clock(...args: any[]): any

set_color_band

  • set_color_band(...args: any[]): any

set_color_pair

  • set_color_pair(...args: any[]): any

set_foreground

  • set_foreground(...args: any[]): any

set_left_margin

  • set_left_margin(...args: any[]): any

set_left_margin_parm

  • set_left_margin_parm(...args: any[]): any

set_lr_margin

  • set_lr_margin(...args: any[]): any

set_page_length

  • set_page_length(...args: any[]): any

set_pglen_inch

  • set_pglen_inch(...args: any[]): any

set_right_margin

  • set_right_margin(...args: any[]): any

set_right_margin_parm

  • set_right_margin_parm(...args: any[]): any

set_tab

  • set_tab(...args: any[]): any

set_tb_margin

  • set_tb_margin(...args: any[]): any

set_top_margin

  • set_top_margin(...args: any[]): any

set_top_margin_parm

  • set_top_margin_parm(...args: any[]): any

set_window

  • set_window(...args: any[]): any

setab

  • setab(...args: any[]): any

setaf

  • setaf(...args: any[]): any

setb

  • setb(...args: any[]): any

setcolor

  • setcolor(...args: any[]): any

setf

  • setf(...args: any[]): any

setup

  • setup(): void

setupDump

  • setupDump(): void

setupTput

  • setupTput(): void

setx

  • setx(x: number): boolean

sety

  • sety(y: number): boolean

sgr

  • sgr(...args: any[]): any

sgr0

  • sgr0(...args: any[]): any

sgr1

  • sgr1(...args: any[]): any

shiftIn

  • shiftIn(): boolean

shiftOut

  • shiftOut(): boolean

showCursor

  • showCursor(): boolean

sigtstp

simpleInsert

  • simpleInsert(ch: string, i?: number, attr?: boolean): boolean
  • Inserts ch repeated i times with given optional attrs at current cursor position.

    Parameters

    • ch: string
    • Optional i: number
    • Optional attr: boolean

    Returns boolean

sitm

  • sitm(...args: any[]): any

slength

  • slength(...args: any[]): any

slines

  • slines(...args: any[]): any

slm

  • slm(...args: any[]): any

sm

  • sm(...args: string[]): boolean

smacs

  • smacs(): boolean

smam

  • smam(...args: any[]): any

smcup

  • smcup(): boolean

smdc

  • smdc(...args: any[]): any

smgb

  • smgb(...args: any[]): any

smgbp

  • smgbp(...args: any[]): any

smgl

  • smgl(...args: any[]): any

smglp

  • smglp(...args: any[]): any

smglr

  • smglr(...args: any[]): any

smgr

  • smgr(...args: any[]): any

smgrp

  • smgrp(...args: any[]): any

smgt

  • smgt(...args: any[]): any

smgtb

  • smgtb(...args: any[]): any

smgtp

  • smgtp(...args: any[]): any

smicm

  • smicm(...args: any[]): any

smir

  • smir(...args: any[]): any

smkx

  • smkx(...args: any[]): any

smln

  • smln(...args: any[]): any

smm

  • smm(...args: any[]): any

smpch

  • smpch(...args: any[]): any

smsc

  • smsc(...args: any[]): any

smso

  • smso(...args: any[]): any

smul

  • smul(...args: any[]): any

smxon

  • smxon(...args: any[]): any

snlq

  • snlq(...args: any[]): any

snrmq

  • snrmq(...args: any[]): any

softReset

  • softReset(): boolean

sshm

  • sshm(...args: any[]): any

ssubm

  • ssubm(...args: any[]): any

ssupm

  • ssupm(...args: any[]): any

start_bit_image

  • start_bit_image(...args: any[]): any

start_char_set_def

  • start_char_set_def(...args: any[]): any

stop_bit_image

  • stop_bit_image(...args: any[]): any

stop_char_set_def

  • stop_char_set_def(...args: any[]): any

su

  • su(param?: number): boolean

subcs

  • subcs(...args: any[]): any

subscript_characters

  • subscript_characters(...args: any[]): any

sum

  • sum(...args: any[]): any

supcs

  • supcs(...args: any[]): any

superscript_characters

  • superscript_characters(...args: any[]): any

swidm

  • swidm(...args: any[]): any

tab

  • tab(): boolean

tabClear

  • tabClear(param?: number): boolean

tabSet

  • tabSet(): boolean

tbc

  • tbc(param?: number): boolean

term

  • term(is: string): boolean

termcap_init2

  • termcap_init2(...args: any[]): any

termcap_reset

  • termcap_reset(...args: any[]): any

these_cause_cr

  • these_cause_cr(...args: any[]): any

to_status_line

  • to_status_line(...args: any[]): any

tone

  • tone(...args: any[]): any

tsl

  • tsl(...args: any[]): any

u0

  • u0(...args: any[]): any

u1

  • u1(...args: any[]): any

u2

  • u2(...args: any[]): any

u3

  • u3(...args: any[]): any

u4

  • u4(...args: any[]): any

u5

  • u5(...args: any[]): any

u6

  • u6(...args: any[]): any

u7

  • u7(...args: any[]): any

u8

  • u8(...args: any[]): any

u9

  • u9(...args: any[]): any

uc

  • uc(...args: any[]): any

unKey

underline_char

  • underline_char(...args: any[]): any

up

  • up(param?: number): boolean

up_half_line

  • up_half_line(...args: any[]): any

user0

  • user0(...args: any[]): any

user1

  • user1(...args: any[]): any

user2

  • user2(...args: any[]): any

user3

  • user3(...args: any[]): any

user4

  • user4(...args: any[]): any

user5

  • user5(...args: any[]): any

user6

  • user6(...args: any[]): any

user7

  • user7(...args: any[]): any

user8

  • user8(...args: any[]): any

user9

  • user9(...args: any[]): any

vi

  • vi(): boolean

vpa

  • vpa(param?: number): boolean

vpr

  • vpr(param?: number): boolean

vtab

  • vtab(): boolean

wait

  • wait(...args: any[]): any

wait_tone

  • wait_tone(...args: any[]): any

wind

  • wind(...args: any[]): any

wingo

  • wingo(...args: any[]): any

write

  • write(text: string): boolean

xoff_character

  • xoff_character(...args: any[]): any

xoffc

  • xoffc(...args: any[]): any

xon_character

  • xon_character(...args: any[]): any

xonc

  • xonc(...args: any[]): any

zero_motion

  • zero_motion(...args: any[]): any

zerom

  • zerom(...args: any[]): any