onKey()
Adds an event handler for
KeyDownevents with the specified key name.
onKey(key: string, handler: string | ViewBuilderEventHandler<TView>): this;
Notes
- Key names are case sensitive (e.g. “Enter”, “Escape”, “ArrowUp”, “Backspace”).
Parameters
- key — The name of the key to handle.
- handler — The function to call, or name of an event to emit.
Return value
The builder instance for chaining.
Related
class ElementBuilder abstractstatic
An abstract base class for UI element builders.
