Hotkeys Docs
Examples
- Kitchen Sink
- App Hotkeys
- Accessibility
- Scopes
- useHotkey
- useHotkey (sequences)
- useHotkey (platforms and alternates)
- useHotkeys
- useHotkeys (sequences)
- useHotkeyRecorder
- useHotkeyRecorder (sequences)
- useHeldKeys
- useKeyHold
- useKeyLockState
- useFormatForDisplay (server rendering)
- useFormatForDisplay (Astro)
- Keyboard Layouts
Octane Example: UseFormatForDisplay Server
import { HotkeysProvider } from '@tanstack/octane-hotkeys'
import { CheatSheetPage } from './CheatSheetPage.tsrx'
import type { HotkeyPlatform } from '@tanstack/octane-hotkeys'
// The server and the browser pass the same platform, so hydration matches
export function App({ platform }: { platform: HotkeyPlatform }) @{
<HotkeysProvider defaultOptions={{ platform }}>
<CheatSheetPage />
</HotkeysProvider>
}