Raxol.Terminal.ANSI.Mouse (Raxol Terminal v2.6.0)

Copy Markdown View Source

Consolidated mouse handling for the terminal emulator. Combines MouseEvents and MouseTracking functionality. Supports various mouse tracking modes and event reporting.

Summary

Types

focus_event()

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

modifier()

@type modifier() :: :shift | :alt | :ctrl | :meta

mouse_action()

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

mouse_button()

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

mouse_event()

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

mouse_mode()

@type mouse_mode() ::
  :basic
  | :normal
  | :highlight
  | :cell
  | :button
  | :all
  | :any
  | :focus
  | :utf8
  | :sgr
  | :urxvt
  | :sgr_pixels

mouse_state()

@type mouse_state() :: %{
  enabled: boolean(),
  mode: mouse_mode(),
  button_state: mouse_button(),
  modifiers: MapSet.t(modifier()),
  position: {integer(), integer()},
  last_position: {integer(), integer()},
  drag_state: :none | :dragging | :drag_end
}

Functions