Contents

init(stateID:)

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

Declaration

init?(stateID: CGEventSourceStateID)

Parameters

  • stateID:

    The event state table to use for this event source. Pass one of the constants listed in Cgeventsourcestateid.

Return Value

A new event source, or NULL if the specified source state is not valid. When you no longer need the event source, you should release it using the function CFRelease.

Discussion

If two or more event sources are using the same source state and one of them is released, the remaining event sources will behave as if all keys and buttons on input devices are up in generating new events from this source.

See Also

Functions