Ghostty.MouseEvent (Ghostty v0.4.6)

Copy Markdown View Source

Represents a mouse input event for the terminal.

Examples

%Ghostty.MouseEvent{action: :press, button: :left, x: 50.0, y: 40.0}
%Ghostty.MouseEvent{action: :release, button: :left, x: 50.0, y: 40.0}
%Ghostty.MouseEvent{action: :motion, x: 55.0, y: 42.0}

Summary

Types

action()

@type action() :: :press | :release | :motion

button()

@type button() :: :left | :right | :middle | :four | :five | nil

modifier()

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

t()

@type t() :: %Ghostty.MouseEvent{
  action: action(),
  button: button(),
  mods: [modifier()],
  x: float(),
  y: float()
}