Here's what I use for this (just paste into your code):
; -----------------------------------------------------------------------------
; Event definitions...
; -----------------------------------------------------------------------------
Const EVENT_None = $0 ; No event (eg. a WaitEvent timeout)
Const EVENT_KeyDown = $101 ; Key pressed
Const EVENT_KeyUp = $102 ; Key released
Const EVENT_ASCII = $103 ; ASCII key pressed
Const EVENT_MouseDown = $201 ; Mouse button pressed
Const EVENT_MouseUp = $202 ; Mouse button released
Const EVENT_MouseMove = $203 ; Mouse moved
Const EVENT_MouseWheel = $204 ; Mouse wheel moved
Const EVENT_MouseEnter = $205 ; Mouse entered canvas
Const EVENT_MouseLeave = $206 ; Mouse left canvas
Const EVENT_Gadget = $401 ; Gadget event
Const EVENT_Move = $801 ; Window moved
Const EVENT_Size = $802 ; Window resized
Const EVENT_Close = $803 ; Window closed
Const EVENT_Front = $804 ; Window brought to front
Const EVENT_Menu = $1001 ; Menu item selected
Const EVENT_LostFocus = $2001 ; App lost focus
Const EVENT_GotFocus = $2002 ; App got focus
Const EVENT_DisplayChange = $2003 ; Display mode changed
Const EVENT_BeginModal = $2004 ; Modal event (window resize/slider drag)
Const EVENT_EndModal = $2005 ; Modal event (window resize/slider drag)
Const EVENT_Timer = $4001 ; Timer event occurred
|