Install Karabiner and Seil
- Copy the private.xml to Library/Application Support/Karabiner/private.xml
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Remap Caps Lock to Hyper</name> | |
<appendix>OS X doesn't have a Hyper. This maps Caps Lock to Control + Shift + Option + Command.</appendix> | |
<identifier>space_cadet.caps_lock_to_hyper</identifier> | |
<autogen> | |
--KeyToKey-- | |
KeyCode::F19, | |
KeyCode::COMMAND_L, | |
ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L | |
</autogen> | |
</item> | |
<item> | |
<name>disable_command_q if app != iTerm</name> | |
<identifier>disable_command_q</identifier> | |
<block> | |
<not>TERMINAL</not> | |
<autogen>__KeyToKey__ KeyCode::Q, VK_COMMAND | ModifierFlag::NONE, | |
KeyCode::VK_NONE</autogen> | |
</block> | |
</item> | |
<item> | |
<name>disable_command_w | |
if app != iTerm</name> | |
<identifier>disable_command_w</identifier> | |
<block> | |
<not>TERMINAL</not> | |
<autogen>__KeyToKey__ KeyCode::W, VK_COMMAND | | |
ModifierFlag::NONE, KeyCode::VK_NONE</autogen> | |
</block> | |
</item> | |
</root> |