hotkey

Originally fromlobehub/lobe-chat
Installation
Summary

Structured guide for implementing keyboard shortcuts in a chat application.

  • Covers five-step implementation process: defining hotkey constants, registering default key combinations, adding i18n translations, creating and registering hooks, and optionally adding tooltips
  • Supports scope-based hotkey management (global or chat-specific) with conflict detection and platform-agnostic key modifiers
  • Includes best practices for grouping, conflict checking, and clear user descriptions, plus troubleshooting steps for common issues like scope mismatches and registration problems
SKILL.md

Adding Keyboard Shortcuts Guide

Steps to Add a New Hotkey

1. Update Hotkey Constant

In src/types/hotkey.ts:

export const HotkeyEnum = {
  // existing...
  ClearChat: 'clearChat', // Add new
} as const;

2. Register Default Hotkey

In src/const/hotkeys.ts:

Related skills

More from lobehub/lobehub

Installs
820
Repository
lobehub/lobehub
GitHub Stars
77.1K
First Seen
Jan 27, 2026