Skip to main content

getHotkeyRegistrations

还没翻译译自英文(tanstack.com)本页 8 段都还没译

function getHotkeyRegistrations(): SvelteHotkeyRegistrations;

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

Svelte function that returns reactive access to all hotkey and sequence registrations from the singleton managers.

This is a standalone function that does NOT require the HotkeysProvider.

Returns

SvelteHotkeyRegistrations

Object with reactive hotkeys and sequences properties

Example

<script>
  import { getHotkeyRegistrations } from '@tanstack/svelte-hotkeys'

  const registrations = getHotkeyRegistrations()
</script>
{#each registrations.hotkeys as reg}
  <div>{reg.options.meta?.name} — {reg.triggerCount} triggers</div>
{/each}