Docs
Cloudflare
CodeRabbit
Railway
AG Grid
Netlify
WorkOS
Clerk
SerpAPI
OpenRouter
Sentry
Prisma
Electric
Unkey
Cloudflare
CodeRabbit
Railway
AG Grid
Netlify
WorkOS
Clerk
SerpAPI
OpenRouter
Sentry
Prisma
Electric
Unkey
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

UseHotkeyOptions

Interface: UseHotkeyOptions

Defined in: useHotkey.ts:17

Extends

  • Omit<HotkeyOptions, "target">

Properties

target?

ts
optional target: 
  | HTMLElement
  | Document
  | Window
  | RefObject<HTMLElement | null>
  | null;
optional target: 
  | HTMLElement
  | Document
  | Window
  | RefObject<HTMLElement | null>
  | null;

Defined in: useHotkey.ts:23

The DOM element to attach the event listener to. Can be a Preact ref, direct DOM element, or null. Defaults to document.