Did you know ... Search Documentation:
Pack sdlpl -- prolog/sdl/events.pl
PublicShow source
 sdl_pollevent(-Event:dict) is semidet
Poll the next pending event. Succeeds once with a dict for each pending event, and fails when the queue is empty.

Event is a dict whose tag is the event type and which always contains the keys type and timestamp. Additional type-specific keys are present depending on the tag:

  • quit -- no extra keys
  • mousemotion -- windowID, which, state, x, y, xrel, yrel
  • mousebutton -- windowID, which, button, state, clicks, x, y
  • keyboard -- windowID, state, repeat, keysym Only the event types handled by the binding are produced. % @see https://wiki.libsdl.org/SDL3/SDL_PollEvent