Agent skill · software engineering · lobehub
hotkey
Use for keyboard shortcuts, registration, key combinations, scope, conflicts and shortcut tooltips.
Why this skill is useful
Provides specific implementation patterns for registering and managing keyboard shortcuts in a LobeHub application that the AI wouldn't reliably generate on its own.
What it needs
About 1k tokens when loaded. Last updated 2026-08-07. 81,352 stars on the source repository.
What this skill does
Adding Keyboard Shortcuts Guide Steps to Add a New Hotkey 1. Update Hotkey Constant In packages/types/src/hotkey.ts, add the new id to the HotkeyId union — it's the source of truth HotkeyEnum is typed against: 2. Register Default Hotkey In packages/const/src/hotkeys.ts, KeyEnum and combineKeys are already defined locally in this file, so no import is needed — add the entry to HotkeyEnum and to HOTKEYSREGISTRATION: 3. Add i18n Translation In packages/locales/src/default/hotkey.ts: 4. Create and Register Hook In src/hooks/useHotkeys/chatScope.ts: 5. Add Tooltip (Optional) Best Practices 1. Scope: Choose global or chat scope based on functionality 2. Grouping: Place in appropriate group (System/Layout/Conversation) 3. Conflict check: Ensure no conflict with system/browser shortcuts 4. Platform: Use KeyEnum.Mod instead of hardcoded Ctrl or Cmd 5. Clear description: Provide title and description for users Troubleshooting Not working: Check scope and RegisterHotkeys hook Not in settings: Verify HOTKEYS\REGISTRATION config Conflict: HotkeyInput component shows warnings Page-specific: Ensure correct scope activation
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills lobehub/hotkey--8a0427