Raxol.Terminal.ANSI.MouseTracking (Raxol v0.5.0)

View Source

Handles mouse tracking and focus tracking for the terminal. Supports various mouse tracking modes and focus tracking events.

Summary

Functions

Disables mouse tracking with the specified mode.

Enables mouse tracking with the specified mode.

Formats a focus event into a tracking sequence.

Formats a mouse event into a tracking sequence.

Parses a focus tracking sequence into a focus event.

Parses a mouse tracking sequence into a mouse event.

Types

focus_event()

@type focus_event() :: :focus_in | :focus_out

mouse_action()

@type mouse_action() :: :press | :release | :move | :drag

mouse_button()

@type mouse_button() :: :left | :middle | :right | :wheel_up | :wheel_down

mouse_event()

@type mouse_event() :: {mouse_button(), mouse_action(), integer(), integer()}

Functions

disable_mouse_tracking(mode)

@spec disable_mouse_tracking(atom()) :: String.t()

Disables mouse tracking with the specified mode.

enable_mouse_tracking(mode)

@spec enable_mouse_tracking(atom()) :: String.t()

Enables mouse tracking with the specified mode.

format_focus_event(atom)

@spec format_focus_event(focus_event()) :: String.t()

Formats a focus event into a tracking sequence.

format_mouse_event(arg)

@spec format_mouse_event(mouse_event()) :: String.t()

Formats a mouse event into a tracking sequence.

parse_focus_sequence(sequence)

@spec parse_focus_sequence(String.t()) :: focus_event() | nil

Parses a focus tracking sequence into a focus event.

parse_mouse_sequence(sequence)

@spec parse_mouse_sequence(String.t()) :: mouse_event() | nil

Parses a mouse tracking sequence into a mouse event.