Events

  Event ID Name Description Event Data Notes
Keyboard Events $101 Key Down Generated when the user presses a key. EventData contains the raw scancode of the key.  
$102 Key Up Generated when the user releases a key. EventData contains the raw scancode of the key.  
$103 Key Stroke Generated when the user presses a key or when a keystroke is automatically generated due to keyboard repeat. EventData contains the ASCII code of the key. As this event is generated purely by the Operating System, the ASCII code returned by EventData is different to the raw scancode returned by the Key Down and Key Up events.
Mouse Events $201 Mouse Down Generated when the user presses a mouse button while the mouse is positioned over a gadget. EventData contains the button being pressed: 1 for the left button, 2 for the right button or 3 for the middle button.
EventSource contains the gadget handle.
You will not get a Mouse Down event for buttons, just a gadget action event ($401).
This event only applies to canvas and window gadgets.
$202 Mouse Up Generated when the user releases a mouse button while the mouse is positioned over a gadget. EventData contains the button being released: 1 for the left button, 2 for the right button or 3 for the middle button.
EventSource contains the gadget handle.
You will not get a Mouse Up event for buttons, just a gadget action event ($401).
This event only applies to canvas and window gadgets.
$203 Mouse Move Generated when the user moves the mouse while it is positioned over a canvas gadget. EventX and EventY contain the new mouse coordinates.
EventSource contains the canvas gadget handle.
Only applies to canvas gadgets.
$204 Mouse Wheel Generated when the user spins the mouse wheel. EventData contains the number of 'clicks' the wheel has been spun.  
$205 Mouse Enter Generated when the mouse pointer enters a canvas gadget. EventSource contains the canvas gadget handle. Only applies to canvas gadgets.
$206 Mouse Leave Generated when the mouse pointer leaves a canvas gadget. EventSource contains the canvas gadget handle. Only applies to canvas gadgets.
Gadget Events $401 Gadget Action Generated when the user changes the state of a gadget. EventSource contains the handle of the gadget that caused the event. This can include such actions as pressing a button, or typing into a textfield.
Window Events $801 Window Move Generated when the user moves a window. EventSource contains the handle of the window gadget that has moved.
EventX and EventY contain the new location of the window.
 
$802 Window Size Generated when the user sizes a window. EventSource contains the handle of the window gadget that has sized.
EventX and EventY contain the new size of the window.
 
$803 Window Close Generated when the user clicks a window's 'close' box. EventSource contains the handle of the window gadget being closed. It is up to the program to actually close the window (see FreeGadget).
$804 Window Activate Generated when the user activates a window. EventSource contains the handle of the window gadget that was activated.  
Menu Events $1001 Menu Action Generated when the user selects a menu. EventData contains the integer identifier of the menu selected. The identifier returnedis is that specified when creating the menu (see CreateMenu).
Application Events $2001 Application Suspend Generated when the user switches to another application.    
$2002 Application Resume Generated when the user switches back to your application.    
$2003 Display Change Generated when the display mode changes.   THIS DOESN'T APPEAR TO WORK!
$2004 Begin Modal Generated when the application goes into a modal event loop.   This is typically caused by resizing a window or dragging a slider. You shouldn't generally have to worry about modal event loops.
$2005 End Modal Generated when the application ends a modal event loop.    
Timer Events $4001 Timer Tick Generated when a custom timer ticks over (see Timers). EventSource contains the handle of the timer.
EventData contains the total number of timer ticks that have occurred.
 

Index