wijjit.terminal.mouse.MouseEvent

class wijjit.terminal.mouse.MouseEvent(type, button, x, y, shift=False, alt=False, ctrl=False, click_count=0)[source]

Represents a mouse event.

Parameters:
  • type (MouseEventType) – Type of mouse event

  • button (MouseButton) – Button that triggered the event

  • x (int) – Column position (0-based)

  • y (int) – Row position (0-based)

  • shift (bool, optional) – Whether Shift key was pressed (default: False)

  • alt (bool, optional) – Whether Alt key was pressed (default: False)

  • ctrl (bool, optional) – Whether Ctrl key was pressed (default: False)

  • click_count (int, optional) – Number of clicks for click events (1=single, 2=double) (default: 0)

Variables:
  • type (MouseEventType) – Type of mouse event

  • button (MouseButton) – Button that triggered the event

  • x (int) – Column position (0-based)

  • y (int) – Row position (0-based)

  • shift (bool) – Whether Shift key was pressed

  • alt (bool) – Whether Alt key was pressed

  • ctrl (bool) – Whether Ctrl key was pressed

  • click_count (int) – Number of clicks for click events

__init__(type, button, x, y, shift=False, alt=False, ctrl=False, click_count=0)
Parameters:
Return type:

None

Methods

__init__(type, button, x, y[, shift, alt, ...])

Attributes

alt

click_count

ctrl

shift

type

button

x

y

type: MouseEventType
button: MouseButton
x: int
y: int
shift: bool = False
alt: bool = False
ctrl: bool = False
click_count: int = 0
__str__()[source]

String representation of mouse event.

Returns:

Human-readable event description

Return type:

str