Skip to content

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