chickadee » ezxdisp » ezx-next-event

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:

CodeButton
1left
2middle
3right
4wheel up
5wheel down

State mask values that may be returned:

MaskState
1shift key
2control key
4left button
8middle button
16right 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:

EventResults
ezx:CLOSE
ezx:BUTTON-PRESS ezx:BUTTON-RELEASEx, y, state, k/b
ezx:KEY-PRESS ezx:KEY-RELEASEx, y, state, k/b
ezx:MOTION-NOTIFYx, y, state