Function

CGEventSourceSetLocalEventsFilterDuringSuppressionState

Sets the mask that indicates which classes of local hardware events are enabled during event suppression.

Declaration

void CGEventSourceSetLocalEventsFilterDuringSuppressionState(CGEventSourceRef source, CGEventFilterMask filter, CGEventSuppressionState state);

Parameters

source

The event source to access.

filter

A mask that specifies the categories of local hardware events to enable during the event suppression interval. See CGEventFilterMask.

state

The type of event suppression interval during which the filter is applied. Pass one of the constants listed in CGEventSuppressionState.

Discussion

By default, the system does not suppress local hardware events from the keyboard or mouse during a short interval after a Quartz event is posted—see CGEventSourceSetLocalEventsSuppressionInterval—and during a synthetic mouse drag (mouse movement with the left or only mouse button down).

Some applications may want to disable events from some of the local hardware during this interval. For example, if you post mouse events only, you may wish to suppress local mouse events and permit local keyboard events to pass through. This function lets you specify an event source, a suppression state (event suppression interval or mouse drag), and a filter mask of event classes to be passed through. The new local events filter takes effect with the next Quartz event you post using this event source.

See Also

Working With Event Sources

CGEventSourceGetTypeID

Returns the type identifier for the opaque type CGEventSourceRef.

CGEventSourceCreate

Returns a Quartz event source created with a specified source state.

CGEventSourceGetKeyboardType

Returns the keyboard type to be used with a Quartz event source.

CGEventSourceSetKeyboardType

Sets the keyboard type to be used with a Quartz event source.

CGEventSourceGetSourceStateID

Returns the source state associated with a Quartz event source.

CGEventSourceButtonState

Returns a Boolean value indicating the current button state of a Quartz event source.

CGEventSourceKeyState

Returns a Boolean value indicating the current keyboard state of a Quartz event source.

CGEventSourceFlagsState

Returns the current flags of a Quartz event source.

CGEventSourceSecondsSinceLastEventType

Returns the elapsed time since the last event for a Quartz event source.

CGEventSourceCounterForEventType

Returns a count of events of a given type seen since the window server started.

CGEventSourceGetUserData

Returns the 64-bit user-specified data for a Quartz event source.

CGEventSourceSetUserData

Sets the 64-bit user-specified data for a Quartz event source.

CGEventSourceGetLocalEventsFilterDuringSuppressionState

Returns the mask that indicates which classes of local hardware events are enabled during event suppression.

CGEventSourceGetLocalEventsSuppressionInterval

Returns the interval that local hardware events may be suppressed following the posting of a Quartz event.

CGEventSourceSetLocalEventsSuppressionInterval

Sets the interval that local hardware events may be suppressed following the posting of a Quartz event.

CGEventSourceGetPixelsPerLine

Gets the scale of pixels per line in a scrolling event source.

CGEventSourceSetPixelsPerLine

Sets the scale of pixels per line in a scrolling event source.