keyDown(atPositionX:positionY:keyPressed:modifiers:forceUpdate:didHandle:at:)
Provides information when a key is pressed.
Declaration
func keyDown(atPositionX mousePositionX: Double, positionY mousePositionY: Double, keyPressed asciiKey: UInt16, modifiers: FxModifierKeys, forceUpdate: UnsafeMutablePointer<ObjCBool>!, didHandle: UnsafeMutablePointer<ObjCBool>!, at time: CMTime)Parameters
- mousePositionX:
X position of the pointer (in ‘drawingCoordinates’ space).
- mousePositionY:
Y position of the pointer (in ‘drawingCoordinates’ space).
- asciiKey:
The ASCII representation of the key pressed.
- modifiers:
The keyboard modifiers currently pressed.
- forceUpdate:
Set to
YESif the filter/generator associated with this control needs to be re-calculated;NOotherwise. - didHandle:
Set to
YESif the control performed an action because of this key press; otherwise, the event is passed back up the object tree. - time:
The current time when the key press happened.
Mentioned in
Discussion
Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.
See Also
Instance Methods
drawOSC(withWidth:height:activePart:destinationImage:at:)drawingCoordinates()hitTestOSC(atMousePositionX:mousePositionY:activePart:at:)keyUp(atPositionX:positionY:keyPressed:modifiers:forceUpdate:didHandle:at:)mouseDown(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseDragged(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseEntered(atPositionX:positionY:modifiers:forceUpdate:at:)mouseExited(atPositionX:positionY:modifiers:forceUpdate:at:)mouseMoved(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseUp(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)