Contents

CGSetLocalEventsSuppressionInterval(_:)

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

Declaration

func CGSetLocalEventsSuppressionInterval(_ seconds: CFTimeInterval) -> CGError

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

Functions