isKeyboardEvent
Commons
stable
Type guard that narrows a TRippleEvent to KeyboardEvent by checking constructor.name. Used internally by the ripple system to apply a square ripple on keyboard activation.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- erequiredTRippleEvent
- The event to classify, typed as TRippleEvent (union of MouseEvent, TouchEvent, KeyboardEvent). The check uses constructor.name for reliable cross-frame detection.
API
Return value
The value returned by this util.
- true and narrows e to KeyboardEvent when the event originated from the keyboard; false for mouse and touch events.
Usage
Examples
Ready-to-paste usage snippets.
Branching ripple behaviour on keyboard vs pointer