Skip to content

hotkey

Adds a keyboard shortcut to an element. It either calls a callback or clicks the node it was added to if one is not provided.

Usage

<div use:hotkey={{ code: "KeyA", callback: () => alert("A") }} />

Installation

Terminal window
npx atmx add action hotkey