Provides implementation singletons and utility methods for event recognizers.
Inheritance Hierarchy
Members
No filters for this type
Constants
An event recognizer for the key-down event of the Alt key.
An event recognizer for the key-down event of the Alt key.
An event recognizer that recognizes when the Alt modifier is active.
An event recognizer that recognizes when the Alt modifier is active.
An event recognizer for the key-up event of the Alt key.
An event recognizer for the key-up event of the Alt key.
An event recognizer that will always return true;
An event recognizer that will always return true;
static
See Also
Developer's Guide
An event recognizer for the key-down event of the Control key.
An event recognizer for the key-down event of the Control key.
An event recognizer that recognizes when the Ctrl modifier is active.
An event recognizer that recognizes when the Ctrl modifier is active.
An event recognizer for the key-up event of the Control key.
An event recognizer for the key-up event of the Control key.
An event recognizer for the key down event of the Escape key.
An event recognizer for the key down event of the Escape key.
An event recognizer for the key-down event of the Meta key.
An event recognizer for the key-down event of the Meta key.
An event recognizer that recognizes when the Meta modifier is active.
An event recognizer that recognizes when the Meta modifier is active.
Meta maps to the Windows key on Windows platforms and the Command key on Mac.
static
An event recognizer for the key-up event of the Meta key.
An event recognizer for the key-up event of the Meta key.
An event recognizer that identifies down events of the left mouse button and of the PEN_CONTACT of a PEN.
An event recognizer that identifies down events of the left mouse button and of the PEN_CONTACT of a PEN.
An event recognizer that identifies drag events with the left mouse button or the PEN_CONTACT of a PEN.
An event recognizer that identifies drag events with the left mouse button or the PEN_CONTACT of a PEN.
An event recognizer that identifies up events of the left mouse button and of the PEN_CONTACT of a PEN.
An event recognizer that identifies up events of the left mouse button and of the PEN_CONTACT of a PEN.
An event recognizer that identifies long presses of the primary touch pointer.
An event recognizer that identifies long presses of the primary touch pointer.
An event recognizer that will always return false;
An event recognizer that will always return false;
static
See Also
Developer's Guide
An event recognizer for the key-down event of the Shift key.
An event recognizer for the key-down event of the Shift key.
An event recognizer that recognizes when the Shift modifier is active.
An event recognizer that recognizes when the Shift modifier is active.
An event recognizer for the key-up event of the Shift key.
An event recognizer for the key-up event of the Shift key.
An event recognizer that identifies double-taps of the primary touch pointer.
An event recognizer that identifies double-taps of the primary touch pointer.
An event recognizer that identifies down events of the primary touch pointer.
An event recognizer that identifies down events of the primary touch pointer.
An event recognizer that identifies long presses of the primary touch pointer.
An event recognizer that identifies long presses of the primary touch pointer.
An event recognizer that identifies long rest events of the primary touch pointer.
An event recognizer that identifies long rest events of the primary touch pointer.
An event recognizer that identifies taps of the primary touch pointer.
An event recognizer that identifies taps of the primary touch pointer.
An event recognizer that identifies up events of the primary touch pointer.
An event recognizer that identifies up events of the primary touch pointer.
Static Methods
Creates an event recognizer for a given key and type using a given set of modifiers.
Creates an event recognizer for a given key and type using a given set of modifiers.
static
Parameters
- type: KeyEventType
- The type of the event.
- data: string
- The key that is subject of the event.
- modifiers?: ModifierKeys
- The state of the modifiers that must be set. This is NONE if not set.
Return Value
- function(EventArgs, unknown): boolean
- The new event recognizer.
Creates an event recognizer for the given arguments.
Creates an event recognizer for the given arguments.
A
null arguments is ignored in the event detection.static
Parameters
- pointerTypes?: PointerType[]
- Any one of the pointerTypes must be present in the event.
- eventTypes?: PointerEventType[]
- Any one of the eventTypes must be present in the event.
- buttons?: PointerButtons
- All buttons that must be set in the event.
- changedButtons?: PointerButtons
- All changedButtons that must be set in the event.
- clickCount?: number
- The clickCount of the event.
- modifiers?: ModifierKeys
- All modifiers that must be set in the event.
- changedModifiers?: ModifierKeys
- All changedModifiers that must be set in the event.
Return Value
- function(EventArgs, unknown): boolean
- A recognizer that detects events with the given arguments.
static
Parameters
- recognizer: function(EventArgs, unknown): boolean
- The recognizer to invert.
Return Value
- function(EventArgs, unknown): boolean
- An implementation that performs the logical negation for the argument.
Examples
Recognizes left mouse down events without the Shift key pressed.
const moveInputMode = graphEditorInputMode.moveSelectedItemsInputMode
moveInputMode.hoverRecognizer = (evt, sender) =>
evt instanceof PointerEventArgs &&
evt.pointerType === PointerType.MOUSE &&
evt.eventType === PointerEventType.DOWN &&
(evt.changedButtons & PointerButtons.MOUSE_LEFT) !== 0 &&
!EventRecognizers.SHIFT_IS_DOWN(evt, sender)