Function

CGSetLocalEventsSuppressionInterval

Sets the time interval in seconds that local hardware events are suppressed after posting a synthetic event.

Declaration

CGError CGSetLocalEventsSuppressionInterval(CFTimeInterval seconds);

Parameters

seconds

The desired time interval in seconds. The value should be a number in the range [0.0, 10.0].

Return Value

A result code. If the seconds parameter is outside the allowed range, returns kCGErrorRangeCheck.

Discussion

This function determines how long local events matching an event filter are to be suppressed following the posting of a synthetic event. The default time interval for event suppression is 0.25 seconds.

This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is CGEventSourceSetLocalEventsSuppressionInterval, which allows the suppression interval to be adjusted for a specific event source, affecting only events posted using that event source.

See Also

Deprecated Functions

CGEventGetSource

Returns a Quartz event source created from an existing Quartz event.

CGPostKeyboardEvent

Synthesizes a low-level keyboard event on the local machine.

Deprecated
CGPostMouseEvent

Synthesizes a low-level mouse-button event on the local machine.

Deprecated
CGPostScrollWheelEvent

Synthesizes a low-level scrolling event on the local machine.

Deprecated
CGEnableEventStateCombining

Enables or disables the merging of actual key and mouse state with the application-specified state in a synthetic event.

Deprecated
CGInhibitLocalEvents

Turns off local hardware events in the current session.

Deprecated
CGSetLocalEventsFilterDuringSuppressionState

Filters local hardware events from the keyboard and mouse during the short interval after a synthetic event is posted.

Deprecated