module AnsiEscapes::Cursor

Defined in:

ansi-escapes.cr

Constant Summary

GET_POSITION = "#{ESC}6n"

Get cursor position.

HIDE = "#{ESC}?25l"

Hide cursor.

LEFT = "#{ESC}100D"

Move cursor to the left side.

NEXT_LINE = "#{ESC}E"

Move cursor to the next line.

PREVIOUS_LINE = "#{ESC}F"

Move cursor to the previous line.

RESTORE_POSITION = "#{ESC}u"

Restore saved cursor position.

SAVE_POSITION = "#{ESC}s"

Save cursor position.

SHOW = "#{ESC}?25h"

Show cursor.

Class Method Summary

Class Method Detail

def self.backward(count = 1) #

Move cursor backward a specific amount of columns.


[View source]
def self.down(count = 1) #

Move cursor down a specific amount of rows.


[View source]
def self.forward(count = 1) #

Move cursor forward a specific amount of columns.


[View source]
def self.home #

Move the cursor to the home position at the upper-left corner of the screen (x0 y0).


[View source]
def self.move(x : Int32, y : Int32) #

Set the position of the cursor relative to its current position.


[View source]
def self.to(x : Int32, y : Int32) #

Absolutely set cursor column and row.


[View source]
def self.to(x : Int32) #

Absolutely set cursor column.


[View source]
def self.up(count = 1) #

Move cursor up a specific amount of rows.


[View source]