Docs
Cloudflare
Railway
CodeRabbit
SerpAPI
Clerk
OpenRouter
Netlify
AG Grid
WorkOS
Prisma
Unkey
Sentry
Electric
Cloudflare
Railway
CodeRabbit
SerpAPI
Clerk
OpenRouter
Netlify
AG Grid
WorkOS
Prisma
Unkey
Sentry
Electric
API Reference
Hotkeys API Reference
Hotkey Sequence API Reference
Key hold & held keys API Reference
Hotkey Recorder API Reference
Hotkey Sequence Recorder API Reference
Normalization & format API Reference
Hotkeys API Reference

CreateHotkeyDefinition

Interface: CreateHotkeyDefinition

Defined in: packages/svelte-hotkeys/src/createHotkeys.svelte.ts:23

A single hotkey definition for use with createHotkeys.

Properties

callback

ts
callback: HotkeyCallback;
callback: HotkeyCallback;

Defined in: packages/svelte-hotkeys/src/createHotkeys.svelte.ts:27

The function to call when the hotkey is pressed


hotkey

ts
hotkey: MaybeGetter<RegisterableHotkey>;
hotkey: MaybeGetter<RegisterableHotkey>;

Defined in: packages/svelte-hotkeys/src/createHotkeys.svelte.ts:25

The hotkey string (e.g., 'Mod+S', 'Escape') or RawHotkey object


options?

ts
optional options: MaybeGetter<CreateHotkeyOptions>;
optional options: MaybeGetter<CreateHotkeyOptions>;

Defined in: packages/svelte-hotkeys/src/createHotkeys.svelte.ts:29

Per-hotkey options (merged on top of commonOptions)