- ezx-next-event EZXprocedure
Removes the next event from the event queue and returns the event-specific information. If there is no event data in the event queue, this function blocks until the next event occurs. The procedure returns 5 values: the type of the event, the X- and Y-coordinates of the mouse pointer at the time of the event, the button- or keyboard-state mask and the button- or key-code of the event.
The following variables contain the event-types that may occur:
- ezx:BUTTON-PRESS or ezx:BUTTON-RELEASE
- ezx:KEY-PRESS or ezx:KEY-RELEASE
- ezx:MOTION-NOTIFY
- ezx:CLOSE
These button-codes are defined:
Code Button 1 left 2 middle 3 right 4 wheel up 5 wheel down State mask values that may be returned:
Mask State 1 shift key 2 control key 4 left button 8 middle button 16 right button For keyboard events, some special keys will return a platform independent keycode:
Home #xff50 Left #xff51 Up #xff52 Right #xff53 Down #xff54 The result values will be undefined for events for which they are not used. This table summarizes what results are valid:
Event Results ezx:CLOSE ezx:BUTTON-PRESS ezx:BUTTON-RELEASE x, y, state, k/b ezx:KEY-PRESS ezx:KEY-RELEASE x, y, state, k/b ezx:MOTION-NOTIFY x, y, state