Hotkeys Docs
Examples
- Kitchen Sink
- Scopes
- create-hotkey
- create-hotkey (sequences)
- create-hotkey (platforms and alternates)
- create-hotkeys
- create-hotkeys (sequences)
- create-hotkey-recorder
- create-hotkey-recorder (sequences)
- get-held-keys
- get-is-key-held
- get-key-lock-state
- getFormatForDisplay (SvelteKit)
- getFormatForDisplay (Astro)
- Keyboard Layouts
Svelte Example: GetFormatForDisplay Astro
<script lang="ts">
import { HotkeysProvider } from '@tanstack/svelte-hotkeys'
import CheatSheetPage from '../CheatSheetPage.svelte'
import type { HotkeyPlatform } from '@tanstack/svelte-hotkeys'
let { platform }: { platform: HotkeyPlatform } = $props()
</script>
<!-- Each island is its own Svelte app, so the provider renders inside it -->
<HotkeysProvider defaultOptions={{ platform }}>
<CheatSheetPage />
</HotkeysProvider>