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

getHotkeyRegistrations

ts
function getHotkeyRegistrations(): SvelteHotkeyRegistrations;
function getHotkeyRegistrations(): SvelteHotkeyRegistrations;

Defined in: packages/svelte-hotkeys/src/getHotkeyRegistrations.svelte.ts:39

Svelte function that returns reactive access to every hotkey registration, chords and sequences, from the singleton HotkeyManager.

This function does NOT require the HotkeysProvider.

Returns

SvelteHotkeyRegistrations

Example

svelte
<script lang="ts">
  const registrations = getHotkeyRegistrations()
</script>

{#each registrations.hotkeys as reg (reg.id)}
  <li>{reg.options.meta?.name}: {formatForDisplay(reg.hotkey)}</li>
{/each}
<script lang="ts">
  const registrations = getHotkeyRegistrations()
</script>

{#each registrations.hotkeys as reg (reg.id)}
  <li>{reg.options.meta?.name}: {formatForDisplay(reg.hotkey)}</li>
{/each}