These are Spites internal events, you can define your own events too.

key-down

Data:

  • key (string)
    • The name of the pressed key as a string
  • scancode (number)
    • The scancode of the pressed key
  • repeat? (boolean)
    • If the key press is a repeat (It's hold down)

key-up

Data:

  • key (string)
    • The name of the pressed key as a string
  • scancode (number)
    • The scancode of the pressed key
  • repeat? (boolean)
    • If the key press is a repeat (It's hold down)

mouse-moved

Data:

  • x (number)
    • X position of the mouse inside the window
  • y (number)
    • Y position of the mouse inside the window

mouse-button-up

Data:

  • x (number)
    • X position of the mouse inside the window
  • y (number)
    • Y position of the mouse inside the window
  • button (number)
    • The index of a button that went down
  • clicks
    • The count of clicks, > 1 means doubleclick for example

mouse-button-down

Data:

  • x (number)
  • X position of the mouse inside the window
  • y (number)
    • Y position of the mouse inside the window
  • button (number)
    • The index of a button that went down
  • clicks
    • The count of clicks, > 1 means doubleclick for example