Hotkeys Docs
Getting Started
AI/LLM: This documentation page is available in plain markdown format at/hotkeys/latest/docs/framework/alpine/reference/functions/hotkeyDirective.md
hotkeyDirective
ts
function hotkeyDirective(alpine): void;Defined in: hotkeyDirective.ts:46
Installs x-hotkey, which registers the hotkey named by its modifiers while its element exists: x-hotkey.mod.s="save()", x-hotkey.escape="close()", x-hotkey.g.h="goHome()". The expression gets $event. Alpine removes the hotkey with its element, and when a morph changes or removes the attribute.
Parameters#
alpine#
Alpine
Returns#
void