Instance Method

getLocalEventsFilterDuringSuppressionState(_:)

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

Declaration

func getLocalEventsFilterDuringSuppressionState(_ state: CGEventSuppressionState) -> CGEventFilterMask

Parameters

source

The event source to access.

state

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

Return Value

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

Discussion

You can configure the system to suppress local hardware events from the keyboard or mouse during a short interval after a Quartz event is posted or during a synthetic mouse drag (mouse movement with the left or only mouse button down). For information about setting this local events filter, see setLocalEventsFilterDuringSuppressionState(_:state:).

This function lets you specify an event source and a suppression state (event suppression interval or mouse drag), and returns a filter mask of event categories to be passed through during suppression.

See Also

Working With Event Sources

class var typeID: CFTypeID

Returns the type identifier for the opaque type CGEventSourceRef.

init?(stateID: CGEventSourceStateID)

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

var keyboardType: CGEventSourceKeyboardType

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

var sourceStateID: CGEventSourceStateID

Returns the source state associated with a Quartz event source.

class func buttonState(CGEventSourceStateID, button: CGMouseButton) -> Bool

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

class func keyState(CGEventSourceStateID, key: CGKeyCode) -> Bool

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

class func flagsState(CGEventSourceStateID) -> CGEventFlags

Returns the current flags of a Quartz event source.

class func secondsSinceLastEventType(CGEventSourceStateID, eventType: CGEventType) -> CFTimeInterval

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

class func counterForEventType(CGEventSourceStateID, eventType: CGEventType) -> UInt32

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

var userData: Int64

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

func setLocalEventsFilterDuringSuppressionState(CGEventFilterMask, state: CGEventSuppressionState)

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

var localEventsSuppressionInterval: CFTimeInterval

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

var pixelsPerLine: Double

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