MouseEvent

termflow.tui.MouseEvent
See theMouseEvent companion object
enum MouseEvent

A single mouse event decoded from the xterm SGR-1006 mouse protocol (CSI < button ; col ; row M / m).

Coordinates are 1-based to match every other coordinate pair in the library — col=1, row=1 is the top-left cell.

The capture mode (xterm "any-event tracking", CSI ?1003h) decides whether MouseEvent.Move events without a held button arrive at all; today the runtime enables button-event tracking only (CSI ?1002h), so apps will see MouseEvent.Press / MouseEvent.Release / MouseEvent.Drag / MouseEvent.Scroll but no bare moves. The enum is wired up regardless so a future "track everything" toggle doesn't change the public API.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Drag(button: MouseButton, col: Int, row: Int, mods: Modifiers)
final case class Move(col: Int, row: Int, mods: Modifiers)
final case class Press(button: MouseButton, col: Int, row: Int, mods: Modifiers)
final case class Release(button: MouseButton, col: Int, row: Int, mods: Modifiers)
final case class Scroll(direction: ScrollDirection, col: Int, row: Int, mods: Modifiers)