Files
dotfiles/macos/keyboard-shortcuts.sh
T
David F GliddenandClaude 0838f1cf8c Initial commit: Complete macOS dotfiles system
🖖 Features:
- Master 'engage' script for one-command setup
- 120+ CLI tools via Homebrew
- 40+ Applications (casks + MAS apps)
- Complete macOS system configuration
- Security hardening and privacy settings
- Obsidian knowledge vault setup
- Comprehensive backup strategies
- Automated symlink management

Live long and prosper\! 🚀

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 13:17:01 +02:00

100 lines
2.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# macOS Keyboard Shortcuts Configuration
set -euo pipefail
echo "Setting up custom keyboard shortcuts..."
# =============================================================================
# Global Shortcuts
# =============================================================================
# Enable access for assistive devices (needed for some shortcuts)
# Note: This may require manual approval in System Preferences > Security & Privacy
# Mission Control shortcuts
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 32 "
<dict>
<key>enabled</key><true/>
<key>value</key><dict>
<key>type</key><string>standard</string>
<key>parameters</key>
<array>
<integer>65535</integer>
<integer>126</integer>
<integer>8388608</integer>
</array>
</dict>
</dict>
"
# =============================================================================
# App-specific shortcuts (examples)
# =============================================================================
# Finder shortcuts
defaults write com.apple.finder NSUserKeyEquivalents -dict-add "Show Package Contents" "@\$o"
# =============================================================================
# Service shortcuts
# =============================================================================
# Create custom services directory
mkdir -p ~/Library/Services
# Note: Some shortcuts need to be set manually in System Preferences
cat << 'EOF' > ~/dotfiles/macos/KEYBOARD_SHORTCUTS.md
# Keyboard Shortcuts Setup
## Manual Configuration Required
Some shortcuts must be set manually in System Preferences:
### System Preferences > Keyboard > Shortcuts
1. **Mission Control**
- Mission Control: Control + Up Arrow
- Application Windows: Control + Down Arrow
- Desktop Left: Control + Left Arrow
- Desktop Right: Control + Right Arrow
2. **Launchpad & Dock**
- Launchpad: F4 (or customize)
3. **App Shortcuts**
- All Applications:
- "Zoom": Cmd+Shift+Z (if you use this often)
### Finder Shortcuts
- Show Package Contents: Cmd+Shift+O (already set by script)
### Custom Services
Create workflows in Automator for:
- Open Terminal Here
- Copy Path
- Convert Images
## Third-party App Shortcuts
Configure these in the respective apps:
### Karabiner-Elements
Your existing config handles:
- Cmd/Option swap for external keyboards
### LaunchBar
- Activation: Space+Space (or Cmd+Space)
### Bartender
- Configure menu bar item shortcuts as needed
## Verification
Test shortcuts after setup:
1. Mission Control (Control + Up)
2. Desktop switching (Control + Left/Right)
3. Finder package contents (Cmd+Shift+O)
EOF
echo "Keyboard shortcuts configuration complete!"
echo "See ~/dotfiles/macos/KEYBOARD_SHORTCUTS.md for manual setup steps."