Anansi v0.0.2 Anansi.Cursor
ANSI escape codes that manipulate the terminal cursor.
ANSI treats the cursor co-ordinates as positive integers of format {row in 1..∞, col in 1..∞}
.
It will ignore requests to move the cursor beyond the bounds of the terminal window.
Summary
Functions
Moves cursor left by amount
Moves cursor left by amount
Moves cursor left by amount
Move cursor to col
of the current row
Moves cursor down by amount
Erases entire thing
around cursor
Erases thing
around the cursor in the specified way
Moves cursor right by amount
Moves cursor right by amount
Hides the cursor
Moves cursor to top-left corner of screen ({1, 1}
)
Moves cursor left by amount
Moves cursor forwards
Moves cursor in direction
Moves cursor in direction
by amount
Moves cursor right by amount
Asks the terminal to report the current cursor position
Move cursor to position {row, col}.
Moves cursor left by amount
Moves the cursor to saved position
Moves cursor right by amount
Move cursor to row
of the current column
Saves the cursor position
Shows the cursor
Moves cursor up by amount
Functions
Erases entire thing
around cursor.
Supported things: :screen
, :line
.
Additionally, the thing
can be a keyword list of things and ways to erase via erase/2
.
Erases thing
around the cursor in the specified way
.
You can erase :all
around the cursor, or just erase to :start
or :end
of thing
.
Supported things: :screen
, :line
.
Moves cursor in direction
.
Allowed directions: :up
, :down
, :right
, or :left
.
The :right
direction is aliased as :forward
, :forwards
, and :next
.
The :left
direction is aliased as :backward
, :backwards
, :back
, and :prev
.
Alternatively, the direction
can be a keyword list of directions and amounts to move via move/2
.
Moves cursor in direction
by amount
.
Allowed directions: :up
, :down
, :right
, or :left
.
The :right
direction is aliased as :forward
, :forwards
, and :next
.
The :left
direction is aliased as :backward
, :backwards
, :back
, and :prev
.
Additionally, the :pos
direction will move to a supplied {row, col}
location,
and the :row
and :col
directions will set that co-ordinate to amount
and
the other to 1
.
Asks the terminal to report the current cursor position.
Terminal will insert "\e[n;mR"
into the input device where n
is the row and m
the column.