On this page:
Mouse  Event
Mouse  Event.kind
Mouse  Event.downs
Mouse  Event.x
Mouse  Event.y
Mouse  Event.timestamp
Mouse  Event.is_  down
Mouse  Event.is_  button_  changed
Mouse  Event.is_  button_  press
Mouse  Event.is_  button_  release
Mouse  Event.is_  dragging
Key  Event
Key  Event.code
Key  Event.release_  code
Key  Event.other_  caps_  code
Key  Event.other_  shift_  code
Key  Event.other_  altgr_  code
Key  Event.other_  shift_  altgr_  code
Key  Event.downs
Key  Event.x
Key  Event.y
Key  Event.timestamp
Key  Event.is_  down
Mouse  Event.Kind
Mouse  Event.Kind.enter
Mouse  Event.Kind.leave
Mouse  Event.Kind.left_  down
Mouse  Event.Kind.left_  up
Mouse  Event.Kind.middle_  down
Mouse  Event.Kind.middle_  up
Mouse  Event.Kind.right_  down
Mouse  Event.Kind.right_  up
Mouse  Event.Kind.motion
Mouse  Event.Down
Mouse  Event.Down.shift
Mouse  Event.Down.control
Mouse  Event.Down.meta
Mouse  Event.Down.alt
Mouse  Event.Down.caps
Mouse  Event.Down.mod3
Mouse  Event.Down.mod4
Mouse  Event.Down.mod5
Mouse  Event.Button
Mouse  Event.Button.left
Mouse  Event.Button.middle
Mouse  Event.Button.right
Mouse  Event.Button.any
Key  Event.Down
Key  Event.Down.shift
Key  Event.Down.control
Key  Event.Down.meta
Key  Event.Down.alt
Key  Event.Down.caps
Key  Event.Down.mod3
Key  Event.Down.mod4
Key  Event.Down.mod5
Key  Event.Key
Key  Event.Key.start
Key  Event.Key.cancel
Key  Event.Key.clear
Key  Event.Key.shift
Key  Event.Key.rshift
Key  Event.Key.control
Key  Event.Key.rcontrol
Key  Event.Key.menu
Key  Event.Key.pause
Key  Event.Key.capital
Key  Event.Key.prior
Key  Event.Key.next
Key  Event.Key.end
Key  Event.Key.home
Key  Event.Key.left
Key  Event.Key.up
Key  Event.Key.right
Key  Event.Key.down
Key  Event.Key.escape
Key  Event.Key.select
Key  Event.Key.print
Key  Event.Key.execute
Key  Event.Key.snapshot
Key  Event.Key.insert
Key  Event.Key.help
Key  Event.Key.numpad0
Key  Event.Key.numpad1
Key  Event.Key.numpad2
Key  Event.Key.numpad3
Key  Event.Key.numpad4
Key  Event.Key.numpad5
Key  Event.Key.numpad6
Key  Event.Key.numpad7
Key  Event.Key.numpad8
Key  Event.Key.numpad9
Key  Event.Key.numpad_  enter
Key  Event.Key.multiply
Key  Event.Key.add
Key  Event.Key.separator
Key  Event.Key.subtract
Key  Event.Key.decimal
Key  Event.Key.divide
Key  Event.Key.f1
Key  Event.Key.f2
Key  Event.Key.f3
Key  Event.Key.f4
Key  Event.Key.f5
Key  Event.Key.f6
Key  Event.Key.f7
Key  Event.Key.f8
Key  Event.Key.f9
Key  Event.Key.f10
Key  Event.Key.f11
Key  Event.Key.f12
Key  Event.Key.f13
Key  Event.Key.f14
Key  Event.Key.f15
Key  Event.Key.f16
Key  Event.Key.f17
Key  Event.Key.f18
Key  Event.Key.f19
Key  Event.Key.f20
Key  Event.Key.f21
Key  Event.Key.f22
Key  Event.Key.f23
Key  Event.Key.f24
Key  Event.Key.numlock
Key  Event.Key.scroll
Key  Event.Key.wheel_  up
Key  Event.Key.wheel_  down
Key  Event.Key.wheel_  left
Key  Event.Key.wheel_  right
Key  Event.Key.release
Key  Event.Key.press
8.13.0.9

8 Events🔗ℹ

class

class MouseEvent():

  constructor (

    ~kind: kind :: MouseEvent.Kind = #'motion,

    ~downs: downs :: Set.of(MouseEvent.Down) = Set{},

    ~x: x :: Int = 0,

    ~y: y :: Int = 0,

    ~timestamp: timestamp :: Int = 0,

  )

 

property

property (ev :: MouseEvent).kind

  :: MouseEvent.Kind

 

property

property (ev :: MouseEvent).downs

  :: Set.of(MouseEvent.Down)

 

property

property (ev :: MouseEvent).x :: Int

 

property

property (ev :: MouseEvent).y :: Int

 

property

property (ev :: MouseEvent).timestamp :: Int

Represents a mouse event.

Checks whether MouseEvent.downs(ev) would include sym, potentially avoiding the construction of a set internally.

Reports a derived property of the mouse event.

class

class KeyEvent():

  constructor (

    code :: (Char || KeyEvent.Key),

    ~release_code: r_code :: (Char || KeyEvent.Key) = #'press,

    ~other_caps_code: oc_code :: maybe(Char || KeyEvent.Key) = #false,

    ~other_shift_code: os_code :: maybe(Char || KeyEvent.Key) = #false,

    ~other_altgr_code: oa_code :: maybe(Char || KeyEvent.Key) = #false,

    ~other_shift_altgr_code: osa_code :: maybe(Char || KeyEvent.Key) = #false,

    ~downs: downs :: Set.of(KeyEvent.Down) = Set{},

    ~x: x :: Int = 0,

    ~y: y :: Int = 0,

    ~timestamp: timestamp :: Int = 0,

    ~use_altgr: use_altgr :: Any = #true,

  )

 

property

property (ev :: KeyEvent).code

  :: (Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).release_code

  :: (Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).other_caps_code

  :: maybe(Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).other_shift_code

  :: maybe(Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).other_altgr_code

  :: maybe(Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).other_shift_altgr_code

  :: maybe(Char || KeyEvent.Key)

 

property

property (ev :: KeyEvent).downs

  :: Set.of(KeyEvent.Down)

 

property

property (ev :: KeyEvent).x :: Int

 

property

property (ev :: KeyEvent).y :: Int

 

property

property (ev :: KeyEvent).timestamp :: Int

Represents a keyboard event.

method

method (ev :: KeyEvent).is_down(

  sym :: KeyEvent.Down

) :: Boolean

Checks whether KeyEvent.downs(ev) would include sym, potentially avoiding the construction of a set internally.

General category for a mouse event.

enumeration

enum MouseEvent.Down:

  shift

  control

  meta

  alt

  caps

  mod3

  mod4

  mod5

Modifier keys that can be down during a mouse event.

enumeration

enum MouseEvent.Button:

  left

  middle

  right

  any

Mouse buttons that can be down during a mouse event.

enumeration

enum KeyEvent.Down:

  shift

  control

  meta

  alt

  caps

  mod3

  mod4

  mod5

Modifier keys that can be down during a key event.

enumeration

enum KeyEvent.Key:

  start

  cancel

  clear

  shift

  rshift

  control

  rcontrol

  menu

  pause

  capital

  prior

  next

  end

  home

  left

  up

  right

  down

  escape

  select

  print

  execute

  snapshot

  insert

  help

  numpad0

  numpad1

  numpad2

  numpad3

  numpad4

  numpad5

  numpad6

  numpad7

  numpad8

  numpad9

  numpad_enter

  multiply

  add

  separator

  subtract

  decimal

  divide

  f1

  f2

  f3

  f4

  f5

  f6

  f7

  f8

  f9

  f10

  f11

  f12

  f13

  f14

  f15

  f16

  f17

  f18

  f19

  f20

  f21

  f22

  f23

  f24

  numlock

  scroll

  wheel_up

  wheel_down

  wheel_left

  wheel_right

  release

  press

Keys that can be pressed or released for a key event.