Usando KeyRemap4MacBook, puoi aggiungerlo a private.xml :
<item>
<name>disable_command_q</name>
<identifier>disable_command_q</identifier>
<autogen>__KeyToKey__ KeyCode::Q, VK_COMMAND | ModifierFlag::NONE, KeyCode::VK_NONE</autogen>
<autogen>__KeyToKey__ KeyCode::Q, VK_COMMAND | VK_SHIFT | ModifierFlag::NONE, KeyCode::Q, ModifierFlag::COMMAND_L</autogen>
</item>
Senza | ModifierFlag::NONE
il primo elemento autogen disabilita anche per esempio ⌥⌘Q. Il secondo elemento di autogen cambia da ⇧⌘Q a ⌘Q.
Ci sono anche impostazioni predefinite che rendono l'invio di ⌘Q richiede di tenere premuto ⌘Q o di premere ⌘Q due volte:
Sonodefinitiin custom_shortcuts.xml :
<item>
<name>Hold Command+Q to Quit Application</name>
<appendix>(You can adjust the threshold time of holding by</appendix>
<appendix>"[Holding Key to Key] Holding Threshold" in Key Repeat tab.)</appendix>
<identifier>remap.holdcommandQ</identifier>
<autogen>__HoldingKeyToKey__ KeyCode::Q, VK_COMMAND | ModifierFlag::NONE, KeyCode::VK_NONE, KeyCode::Q, VK_COMMAND, Option::NOREPEAT</autogen>
</item>
<item>
<name>Press Command+Q twice to Quit Application</name>
<identifier>remap.doublepresscommandQ</identifier>
<autogen>__DoublePressModifier__ KeyCode::Q, VK_COMMAND | ModifierFlag::NONE,
KeyCode::VK_NONE,
KeyCode::Q, VK_COMMAND
</autogen>
</item>