keyboard-shortcuts

Implement keyboard shortcuts and menu bar commands in macOS SwiftUI apps.

32|10|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/moasq/nanowave --skill keyboard-shortcuts-moasq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: keyboard-shortcuts
Source: https://github.com/moasq/nanowave/tree/main/internal/orchestration/skills/macos/keyboard-shortcuts
Command: npx skills add https://github.com/moasq/nanowave --skill keyboard-shortcuts-moasq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers implement standard and custom keyboard shortcuts for macOS applications, ensuring a better user experience and adherence to platform conventions.

Core Features & Use Cases

  • Button Shortcuts: Easily assign keyboard shortcuts to buttons using .keyboardShortcut().
  • Custom Menus: Define custom menus in the macOS menu bar using CommandMenu.
  • Extend System Menus: Add items to existing system menus (like File or Edit) using CommandGroup.
  • Use Case: When building a new macOS app, use this Skill to ensure all primary actions have intuitive keyboard shortcuts, like Cmd+S for saving or Cmd+N for new items.

Quick Start

Use the keyboard-shortcuts skill to add a Cmd+Shift+N shortcut for a 'New Project' button within a custom menu.

Frequently Asked Questions about keyboard-shortcuts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement keyboard shortcuts for buttons in a macOS SwiftUI app?

Assign keyboard shortcuts to buttons in SwiftUI using the `.keyboardShortcut()` modifier, allowing users to trigger actions via key combinations like Cmd+S for saving.

What is the best way to add custom menus to the macOS menu bar using SwiftUI?

Add custom menus to the macOS menu bar using SwiftUI's `CommandMenu`, which lets you define new menu items and assign actions directly within your application's interface.

How do I extend existing system menus like File or Edit in SwiftUI?

Extend existing system menus in SwiftUI using `CommandGroup` to insert custom commands into standard macOS menus like File or Edit, adhering to Apple's discoverability conventions.

Can I use SwiftUI to create keyboard shortcuts that follow macOS conventions?

Yes, SwiftUI provides `.keyboardShortcut()`, `CommandMenu`, and `CommandGroup` specifically to implement keyboard shortcuts and menu commands that align with standard macOS platform conventions.

How do I add a Cmd+Shift+N shortcut for a new project action in macOS?

Use the `.keyboardShortcut()` modifier on a button or menu item within a `CommandMenu` to define a Cmd+Shift+N shortcut, triggering your 'New Project' action in macOS.