Contents

buttonState(_:button:)

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

Declaration

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

Parameters

  • stateID:

    The source state to access. Pass one of the constants listed in Cgeventsourcestateid.

  • button:

    The mouse button to test. Pass one of the constants listed in Cgmousebutton.

Return Value

If true, the button is down. If false, the button is up.

See Also

Functions