When to use this skill
ALWAYS use this skill when the user mentions:
- Native window menus with shortcuts / 原生窗口菜单与快捷键
- Menu events and command handlers / 菜单事件与命令处理
- Platform-specific menu layouts / 平台菜单布局差异
Trigger phrases include:
- "window menu", "shortcuts", "menu events", "command handlers"
- "Window menu", "shortcuts", "menu events", "command handling"
How to use this skill
- Define menu structure and keyboard shortcuts
- Separate command identifiers from event handlers
- Handle platform-specific menu conventions
- Test menu event routing and focus behavior
Outputs
- Menu layout and shortcut plan / 菜单布局与快捷键方案
- Event routing checklist / 事件路由清单
Scope
- Boundary: Window menu definitions and event handling
- Key points: Command/handler separation and testability
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/learn/window-menu/
- https://v2.tauri.app/zh-cn/learn/window-menu/
Keywords
tauri menu, window menu, shortcuts, commands
Common Gotchas (Gotchas)
- Version compatibility: Pay attention to 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 set correctly, and do not hard-code sensitive information
- Dependency conflicts: When multiple versions coexist, pay attention to dependency conflicts and use lock files to pin versions
- Performance pitfalls: Pay attention to performance optimization in large-data scenarios, and avoid common issues 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 core features according to the example code.
Step 4: Test verification
Run tests to ensure functionality works properly.
Step 5: Deployment and launch
After completing development, proceed with deployment and monitoring.