Skip to main content
replaced http://apple.stackexchange.com/ with https://apple.stackexchange.com/
Source Link

Continuing on jtbandes' solutionjtbandes' solution, once you have remapped the standard Quit command to a different keystroke (yes, sadly, you need to remap it manually for every application you are worried about accidentally quitting), you can create a service in Automator that takes no input. It should have a single action: Run AppleScript. The script is:

tell application "System Events"
    set theName to name of the first process whose frontmost is true
end tell
tell application theName
    display dialog "Are you sure you want to quit?"
    quit
end tell

You then save that service (I called mine "SafeSave"), and assign the service the keystroke Q. You have thus reclaimed the standard keystroke.

Continuing on jtbandes' solution, once you have remapped the standard Quit command to a different keystroke (yes, sadly, you need to remap it manually for every application you are worried about accidentally quitting), you can create a service in Automator that takes no input. It should have a single action: Run AppleScript. The script is:

tell application "System Events"
    set theName to name of the first process whose frontmost is true
end tell
tell application theName
    display dialog "Are you sure you want to quit?"
    quit
end tell

You then save that service (I called mine "SafeSave"), and assign the service the keystroke Q. You have thus reclaimed the standard keystroke.

Continuing on jtbandes' solution, once you have remapped the standard Quit command to a different keystroke (yes, sadly, you need to remap it manually for every application you are worried about accidentally quitting), you can create a service in Automator that takes no input. It should have a single action: Run AppleScript. The script is:

tell application "System Events"
    set theName to name of the first process whose frontmost is true
end tell
tell application theName
    display dialog "Are you sure you want to quit?"
    quit
end tell

You then save that service (I called mine "SafeSave"), and assign the service the keystroke Q. You have thus reclaimed the standard keystroke.

Source Link
Daniel
  • 35.1k
  • 31
  • 155
  • 193

Continuing on jtbandes' solution, once you have remapped the standard Quit command to a different keystroke (yes, sadly, you need to remap it manually for every application you are worried about accidentally quitting), you can create a service in Automator that takes no input. It should have a single action: Run AppleScript. The script is:

tell application "System Events"
    set theName to name of the first process whose frontmost is true
end tell
tell application theName
    display dialog "Are you sure you want to quit?"
    quit
end tell

You then save that service (I called mine "SafeSave"), and assign the service the keystroke Q. You have thus reclaimed the standard keystroke.