package matrix
Module Input.MouseSource
Mouse buttons and motion events.
Buttons
The type for mouse buttons.
equal_button a b is true iff a and b are the same button.
pp_button formats mouse buttons for debugging.
Button state
The type for primary button state during motion events.
equal_button_state a b is true iff all fields are equal.
pp_button_state formats button state for debugging.
Scroll direction
equal_scroll_direction a b is true iff a and b are the same direction.
pp_scroll_direction formats scroll directions for debugging.
Mouse events
type event = | Button_press of int * int * button * Key.modifier(*
*)Button_press (x, y, button, mods)is a button press at(x, y). Coordinates are 0-based, top-left origin.| Button_release of int * int * button * Key.modifier(*
*)Button_release (x, y, button, mods)is a button release at(x, y). In legacy tracking modes (X10/Normal, URXVT)buttonisButton 0because the protocol does not encode which button was released.| Motion of int * int * button_state * Key.modifier(*
*)Motion (x, y, state, mods)is mouse motion to(x, y)with primary buttonstateandmods.
The type for mouse events. Coordinates are 0-based with top-left origin.
equal_event a b is true iff a and b are structurally equal.
pp_event formats mouse events for debugging.