keyState(_:key:)
Returns a Boolean value indicating the current keyboard state of a Quartz event source.
Declaration
class func keyState(_ stateID: CGEventSourceStateID, key: CGKeyCode) -> BoolParameters
- stateID:
The source state to access. Pass one of the constants listed in Cgeventsourcestateid.
- key:
The virtual key code to test.
Return Value
If true, the key is down. If false, the key is up.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()