Skip to content
theRealProHacker edited this page Aug 28, 2023 · 3 revisions

Mouse Events

  • click and auxclick:

    • bubbles
    • target: The Element clicked
    • pos: the mouse position on the screen
    • mods: An int mask, which mods are pressed
    • button: invalid: 0, left: 1, middle: 2, right: 3; 4 and 5 are special buttons
    • buttons: A bit mask of which mouse buttons are down
    • detail: Which click this is. The 1st, 2nd, 3rd, ...
  • mousedown:

    • target: The Element the mouse was pressed in
    • pos
    • mods
    • buttons
  • mouseup:

    • target: The Element the mouse was released in
    • pos
    • mods
    • buttons
  • mousemove:

    • target: The Element the mouse was moved in
    • pos: the new mouse position
    • mods
    • buttons
  • wheel:

    • target
    • pos
    • mods
    • buttons
    • delta: The x and y delta of the mouse wheel event
  • Coming: mouseleave/mouseout and mouseenter/mouseover

Keyboard Events

  • keydown
  • keyup
  • input

Global/Window Events

Only fire on the <html> element/the document. So call them by doing J("html").on(event, callback).

  • online and offline with no attributes

  • resize:

    • size = (width, height)
  • All other pygame events (except for WINDOWRESIZED) lowercased. The arguments of the event are copied from pygame, so look into the documentation where you will find a list of window events with their attributes.

Clone this wiki locally