Get the action
npx lomer-ui action escape-key
Action
Escape Key
Detects and handles the Escape key press.
Installation
Get the action
npx lomer-ui action escape-key
Usage
Preview
Press escape key
Svelte Code
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
Parameters
Parameter | Type | Description |
---|---|---|
callback | (event: KeyboardEvent) => void | Function triggered when Escape is pressed on the topmost element. |