KS
Killer-Skills

hotkey — how to use hotkey in AI agents how to use hotkey in AI agents, hotkey setup guide, hotkey vs keyboard shortcut, hotkey installation for AI agents, what is hotkey in AI development, hotkey alternative for custom keyboard interactions, hotkey implementation in TypeScript, hotkey registration process, hotkey constant update

v1.0.0
GitHub

About this Skill

Ideal for AI Agents like Cursor and AutoGPT needing customized keyboard interactions and shortcuts. hotkey is a feature that enables developers to assign custom keyboard shortcuts to specific actions in AI agents, using constants and registrations defined in TypeScript files.

Features

Updates HotkeyEnum constant in src/types/hotkey.ts to add new hotkeys
Registers default hotkeys using the HOTKEYS_REGISTRATION array in src/const/hotkeys.ts
Utilizes the combineKeys function from @lobehub/ui to define hotkey combinations
Supports hotkey groups, such as HotkeyGroupEnum.Conversation, for organized registration
Exports HotkeyRegistration type for custom hotkey definitions
Integrates with TypeScript for typed hotkey constants and registrations

# Core Topics

kissMyApps-tlm kissMyApps-tlm
[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 kissMyApps-tlm/kissmychat/hotkey

Agent Capability Analysis

The hotkey MCP Server by kissMyApps-tlm 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 in AI agents, hotkey setup guide, hotkey vs keyboard shortcut.

Ideal Agent Persona

Ideal for AI Agents like Cursor and AutoGPT needing customized keyboard interactions and shortcuts.

Core Value

Empowers agents to register custom hotkeys using HotkeyEnum and KeyMapEnum, enabling seamless keyboard interactions with combineKeys from @lobehub/ui, and updating default hotkeys in HOTKEYS_REGISTRATION.

Capabilities Granted for hotkey MCP Server

Registering new hotkeys for conversation management
Updating default hotkey mappings for agent-specific tasks
Customizing keyboard shortcuts for enhanced user experience

! Prerequisites & Limits

  • Requires updating HotkeyEnum constant in src/types/hotkey.ts
  • Needs registration of default hotkeys in src/const/hotkeys.ts
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