Wednesday, June 27, 2012

Changing default quit key for apps on macos

The following command will change the default key to Command+Shift+Q for Mail and Safari.

defaults write NSGlobalDomain NSUserKeyEquivalents '{"Quit Safari" = "@$Q"; "Quit Mail" = "@$Q";}'


The odd characters before the 'Q' in the previous command, specify the modifiers:
  • @ = Command 
  • $ = Shift 
  • ~ = Option 
  • ^ = Control