Skip to main content

cursor

Index

Variables

consthide

hide: string = ansiEscapes.cursorHide

Hide the cursor.

constnextLine

nextLine: string = ansiEscapes.cursorNextLine

Move cursor to the next line.

constposition

position: string = ansiEscapes.cursorGetPosition

Return the current cursur position.

constprevLine

prevLine: string = ansiEscapes.cursorPrevLine

Move cursor to the previous line.

constrestorePosition

restorePosition: string = ansiEscapes.cursorRestorePosition

Restores the cursor position/state.

constsavePosition

savePosition: string = ansiEscapes.cursorSavePosition

Saves the cursor position/state.

constshow

show: string = ansiEscapes.cursorShow

Show the cursor.

conststartLine

startLine: string = ansiEscapes.cursorLeft

Move cursor to the start of the current line.

Functions

backward

  • backward(count?: number): string
  • Number of columns to move backward. Defaults to 1.

down

  • down(count?: number): string
  • Number of rows to move down. Defaults to 1.

forward

  • forward(count?: number): string
  • Number of columns to move forward. Defaults to 1.

to

  • to(x: number, y?: number): string
  • Set the relative position of the cursor.

toAbsolute

  • toAbsolute(x: number, y?: number): string
  • Set the absolute position of the cursor, starting from the top left.

up

  • up(count?: number): string
  • Number of rows to move up. Defaults to 1.