SetEventMask
SetEventMask Set the system event mask
#include <OSEvents.h> Event Manager
void SetEventMask(eventMask );
short eventMask ; mask to be used to include/exclude events
SetEventMask sets the low-level mask used by the system to determine
which events it should post to the event queue.
eventMask is a 16-bit binary mask describing which events to include or
exclude. The normal value is 0xFFEF (which excludes only keyUp
events). Use eventMask=everyEvent ( defined in Events.h as 0xFFFF)
to include all events. See Event Mask for named constants you can
use in this value.
Returns: none

Notes: The preferred way to access the system event mask is by reading or storing
the global variable SysEvtMask (at 0x0144).
Indiscriminately changing this mask can cause problems. The only
legitimate use is to allow enqueuing of keyUp events, i.e.:
SetEventMask( everyEvent ); // or SysEvtMask |= keyUpMask
Applications making this call during initialization must save the event
mask prior to calling SetEventMask and restore the event mask when
quitting.
If, under Finder, an application fails to restore the event mask before
quitting and it was set to mask out mouseUp events, all mouseUp events
would continue to be masked out. The user would then notice that the Finder
no longer recognizes double clicks. There are other anomalies associated
with MultiFinder; to get a summary of these see the entry
About MultiFinder.