KS
Killer-Skills

hotkey — how to use hotkey how to use hotkey, hotkey setup guide, hotkey alternative, hotkey vs keyboard shortcut, what is hotkey, hotkey install for AI agents, typescript hotkey integration, custom keyboard shortcuts for AI agents

v1.0.0
GitHub

About this Skill

Perfect for UI-focused Agents needing customizable keyboard shortcuts for streamlined conversation workflows. Hotkey is a feature that allows developers to assign custom keyboard shortcuts to specific actions in their AI agents, using constants and registrations.

Features

Updates hotkey constants in src/types/hotkey.ts
Registers default hotkeys in src/const/hotkeys.ts
Utilizes KeyMapEnum and combineKeys from @lobehub/ui
Supports HotkeyEnum for clear chat actions
Enables customization of keyboard shortcuts for conversation workflows

# Core Topics

cute-baobao cute-baobao
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
36
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add cute-baobao/pm/hotkey

Agent Capability Analysis

The hotkey MCP Server by cute-baobao is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use hotkey, hotkey setup guide, hotkey alternative.

Ideal Agent Persona

Perfect for UI-focused Agents needing customizable keyboard shortcuts for streamlined conversation workflows.

Core Value

Empowers agents to register custom hotkeys using TypeScript and UI frameworks like @lobehub/ui, enabling efficient conversation management via keyboard shortcuts such as 'ClearChat' and combining keys with 'combineKeys' from '@lobehub/ui'.

Capabilities Granted for hotkey MCP Server

Registering default hotkeys for common actions
Updating hotkey constants for new features
Streamlining conversation workflows with custom keyboard shortcuts

! Prerequisites & Limits

  • Requires TypeScript and UI framework compatibility
  • Needs access to 'src/types/hotkey.ts' and 'src/const/hotkeys.ts' files
Project
SKILL.md
2.1 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Adding Keyboard Shortcuts Guide

Steps to Add a New Hotkey

1. Update Hotkey Constant

In src/types/hotkey.ts:

typescript
1export const HotkeyEnum = { 2 // existing... 3 ClearChat: 'clearChat', // Add new 4} as const;

2. Register Default Hotkey

In src/const/hotkeys.ts:

typescript
1import { KeyMapEnum as Key, combineKeys } from '@lobehub/ui'; 2 3export const HOTKEYS_REGISTRATION: HotkeyRegistration = [ 4 { 5 group: HotkeyGroupEnum.Conversation, 6 id: HotkeyEnum.ClearChat, 7 keys: combineKeys([Key.Mod, Key.Shift, Key.Backspace]), 8 scopes: [HotkeyScopeEnum.Chat], 9 }, 10];

3. Add i18n Translation

In src/locales/default/hotkey.ts:

typescript
1const hotkey: HotkeyI18nTranslations = { 2 clearChat: { 3 desc: '清空当前会话的所有消息记录', 4 title: '清空聊天记录', 5 }, 6};

4. Create and Register Hook

In src/hooks/useHotkeys/chatScope.ts:

typescript
1export const useClearChatHotkey = () => { 2 const clearMessages = useChatStore((s) => s.clearMessages); 3 return useHotkeyById(HotkeyEnum.ClearChat, clearMessages); 4}; 5 6export const useRegisterChatHotkeys = () => { 7 useClearChatHotkey(); 8 // ...other hotkeys 9};

5. Add Tooltip (Optional)

tsx
1const clearChatHotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.ClearChat)); 2 3<Tooltip hotkey={clearChatHotkey} title={t('clearChat.title', { ns: 'hotkey' })}> 4 <Button icon={<DeleteOutlined />} onClick={clearMessages} /> 5</Tooltip>;

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 Key.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

Related Skills

Looking for an alternative to hotkey or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication