When to use this skill
ALWAYS use this skill when the user mentions:
- Global hotkeys outside app focus / 应用外全局快捷键
- Shortcut conflicts and cleanup / 快捷键冲突与清理
- Shortcut actions to focus the app / 快捷键聚焦应用
Trigger phrases include:
- "global shortcut", "hotkey", "conflict", "focus"
- "全局快捷键", "热键", "冲突", "聚焦"
How to use this skill
- Define global shortcuts and user-configurable settings
- Register shortcuts and resolve conflict scenarios
- Route shortcuts to window focus or command actions
- Release shortcuts on app exit
Outputs
- Global shortcut registration plan / 全局快捷键注册方案
- Conflict handling checklist / 冲突处理清单
Scope
- Boundary: Global shortcut plugin usage only
- Key points: Conflict handling and cleanup
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/plugin/global-shortcut/
- https://v2.tauri.app/zh-cn/plugin/global-shortcut/
Keywords
tauri global shortcut, hotkeys, focus, conflicts
Common Gotchas (Gotchas)
- Version Compatibility: Pay attention to the compatibility between framework versions and dependency libraries; APIs may differ across versions
- Configuration File Format: Configuration file format errors are the most common issue; it is recommended to use the editor's syntax checking
- Environment Variables: Ensure all necessary environment variables are correctly set, and do not hardcode sensitive information
- Dependency Conflicts: When multiple versions coexist, beware of dependency conflicts; use a lock file to pin versions
- Performance Pitfalls: Pay attention to performance optimization in large data volume scenarios, and avoid common problems such as N+1 queries
Usage Workflow
Step 1: Environment Preparation
Ensure the development environment has the necessary dependencies and tools installed.
Step 2: Configuration Initialization
Perform basic configuration according to project requirements.
Step 3: Using Core Features
Implement the core functionality according to the example code.
Step 4: Test Verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and Launch
After completing development, proceed with deployment and monitoring.