KeyboardEvents
Provides functionality to bind key presses and key combinations to a DOM element.
Properties
eventName String
Specifies the event name in which to listen to. For example, keyup
, keydown
, or keypress
.
Default:
keyup
keyConfigs { [key: string]: string }
Specifies a collection of key presses and key combinations associated with the corresponding action.
Default:
{}
Methods
addEventListener
Attaches an event handler to a specified element. This method allows you to set up a function that will be called whenever the specified event is delivered to the target element.
Parameter | Type | Description |
---|---|---|
eventName | String | A string value that defines the name of the event. |
handler | Function | Defines the function to run when the event is triggered. |
Returns: Void
dataBind
Applies all pending property changes to the Button.
Returns: Void
destroy
Destroys the Aware instance, detaches all related events, removes attributes, css classes and restores the root element.
Returns: Void
removeEventListener
Removes the attached event handler for the specified event listener.
Parameter | Type | Description |
---|---|---|
eventName | String | A string value that defines the name of the event to be removed. |
handler | Function | Defines the function to be removed. |
Returns: Void
Events
keyAction EmitType<KeyboardEventArgs>
Specifies the event callback when a keystroke is matched in the keyConfigs.