Skip to content

SKHD - Simple Hotkey Daemon

SKHD provides global hotkeys for seamless application launching and window management integration with Yabai.

🎯 Overview

SKHD (Simple Hotkey Daemon) is a lightweight hotkey daemon for macOS that enables global keyboard shortcuts. It’s tightly integrated with Yabai for window management and provides quick access to frequently used applications.

Key Features

  • Global Hotkeys: System-wide keyboard shortcuts
  • Application Launching: Quick access to development tools
  • Window Management: Integration with Yabai tiling
  • Modifier Keys: Uses meh (ctrl+alt+cmd) and hyper (ctrl+alt+cmd+shift)

πŸš€ Application Shortcuts

All application shortcuts use the meh key (ctrl+alt+cmd) for consistency and to avoid conflicts.

Development Tools

ShortcutApplicationDescription
meh + aGhosttyPrimary terminal emulator
meh + xCodexAI coding assistant
meh + wWindsurfAI-powered IDE
meh + vCursorAI-powered code editor
meh + dDBeaverDatabase management tool

Browsers & Communication

ShortcutApplicationDescription
meh + sArcPrimary web browser
meh + mFirefoxSecondary browser
meh + jZen BrowserAlternative browser
meh + kSlackTeam communication
meh + rZaloMessaging app
meh + gDiscordCommunity chat
meh + zZoomVideo conferencing
meh + tMicrosoft TeamsEnterprise communication

Productivity & AI Tools

ShortcutApplicationDescription
meh + oObsidianNote-taking and knowledge management
meh + uClaudeAI assistant
meh + lPerplexityAI search engine
meh + bLinearProject management
meh + iStructuredTask and time management
meh + eLibreOfficeOffice suite

πŸͺŸ Window Management

SKHD integrates with Yabai for powerful window management capabilities.

Window Focus

ShortcutActionDescription
ctrl + shift + hFocus WestMove focus to left window
ctrl + shift + jFocus SouthMove focus to bottom window
ctrl + shift + kFocus NorthMove focus to top window
ctrl + shift + lFocus EastMove focus to right window

Window Movement

ShortcutActionDescription
cmd + shift + hWarp WestMove window to the left
cmd + shift + jWarp SouthMove window down
cmd + shift + kWarp NorthMove window up
cmd + shift + lWarp EastMove window to the right

Window Resizing

ShortcutActionDescription
hyper + leftResize LeftDecrease width from left
hyper + downResize DownIncrease height downward
hyper + upResize UpDecrease height upward
hyper + rightResize RightIncrease width to right

Space Management

ShortcutActionDescription
hyper + 1-9Send to SpaceMove window to specific space
hyper + xSend to RecentMove window to recent space
cmd + ctrl + 1-4Move & FollowMove window and follow to space

Layout Controls

ShortcutActionDescription
hyper + eBalance WindowsEqualize window sizes
hyper + fToggle FullscreenZoom fullscreen
shift + alt + fNative FullscreenmacOS native fullscreen
shift + alt + spaceToggle FloatFloat/unfloat window
alt + rRotate ClockwiseRotate layout 270Β°
shift + alt + rRotate CounterRotate layout 90Β°

Gap Controls

ShortcutActionDescription
hyper + iToggle GapsEnable/disable gaps and padding
hyper + oToggle PaddingToggle padding only

βš™οΈ Configuration

Configuration File

  • Location: dotfiles/skhd/.config/skhd/skhdrc
  • Reload: skhd --restart-service

Key Modifier Definitions

Terminal window
# Modifier key definitions
meh = ctrl + alt + cmd # Primary modifier for apps
hyper = ctrl + alt + cmd + shift # Secondary modifier for window management

Adding New Shortcuts

Application Shortcuts

Terminal window
# Template for new application
meh - [key] : open "/Applications/AppName.app"
# Example: Add new app
meh - n : open "/Applications/Notion.app"

Window Management Shortcuts

Terminal window
# Template for window actions
[modifier] - [key] : yabai -m window --[action] [parameters]
# Example: New resize shortcut
hyper - 0 : yabai -m space --balance

Service Management

Terminal window
# Start SKHD service
brew services start skhd
# Stop SKHD service
brew services stop skhd
# Restart SKHD service
brew services restart skhd
skhd --restart-service
# Check service status
brew services list | grep skhd

πŸ”§ Troubleshooting

Common Issues

Shortcuts Not Working

Terminal window
# Check if SKHD is running
ps aux | grep skhd
# Restart SKHD service
skhd --restart-service
# Check for configuration errors
skhd --verbose

Permission Issues

/usr/local/bin/skhd
# SKHD needs accessibility permissions
# Go to: System Preferences β†’ Security & Privacy β†’ Privacy β†’ Accessibility

Application Not Opening

Terminal window
# Verify application path
ls "/Applications/AppName.app"
# Check if application exists
mdfind "kMDItemDisplayName == 'AppName'"
# Test opening manually
open "/Applications/AppName.app"

Conflicts with Other Apps

Terminal window
# Check for conflicting shortcuts
# Some apps may override global shortcuts
# Use different modifier combinations
# Consider using hyper instead of meh for some shortcuts

Configuration Debugging

Test Configuration

Terminal window
# Check configuration syntax
skhd --config-file ~/.config/skhd/skhdrc --verbose
# Monitor key events
skhd --observe
# Reload configuration
skhd --reload

Key Code Discovery

Terminal window
# Find key codes for special keys
skhd --observe
# Press the key you want to map
# Note the key code displayed

Performance Optimization

Reduce Latency

Terminal window
# Minimize delay in shortcuts
# Avoid complex shell commands in shortcuts
# Use direct application paths instead of scripts when possible

Memory Usage

Terminal window
# Monitor SKHD memory usage
ps aux | grep skhd
# SKHD should use minimal memory
# If high usage, check for configuration loops

πŸ“š Advanced Configuration

Conditional Shortcuts

Terminal window
# Different shortcuts based on active application
# Example: Different behavior in terminal vs browser

Mode-Based Shortcuts

Terminal window
# Create different modes for different workflows
# Example: Development mode vs presentation mode

Integration with Scripts

Terminal window
# Call custom scripts from shortcuts
meh - p : ~/.local/bin/project-setup.sh
# Pass parameters to scripts
meh - shift - p : ~/.local/bin/project-setup.sh --template react

Dynamic Application Detection

Terminal window
# Open different apps based on context
# Example: Open appropriate terminal based on current project

πŸ”— Integration

Yabai Integration

  • Window management shortcuts directly control Yabai
  • Seamless tiling and space management
  • Consistent modifier keys across both tools

Tmux Integration

  • Application shortcuts work from within tmux sessions
  • Terminal applications respect tmux session context

Neovim Integration

  • Shortcuts work while Neovim is focused
  • No conflicts with Neovim’s key mappings