Skip to content

Instantly share code, notes, and snippets.

@dracos
Created December 17, 2014 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dracos/7a0e2c9e3f1af8b35867 to your computer and use it in GitHub Desktop.
Save dracos/7a0e2c9e3f1af8b35867 to your computer and use it in GitHub Desktop.
Karabiner config for mapping the Mac curly quote shortcuts to what they SHOULD be
<?xml version="1.0"?>
<root>
<item>
<name>Swap curly quote keyboard shortcuts</name>
<identifier>private.swap_curly_quotes</identifier>
<autogen>
__KeyToKey__
KeyCode::BRACKET_LEFT, ModifierFlag::OPTION_L | ModifierFlag::NONE,
KeyCode::BRACKET_RIGHT, ModifierFlag::OPTION_L
</autogen>
<autogen>
__KeyToKey__
KeyCode::BRACKET_LEFT, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
KeyCode::BRACKET_LEFT, ModifierFlag::OPTION_L
</autogen>
<autogen>
__KeyToKey__
KeyCode::BRACKET_RIGHT, ModifierFlag::OPTION_L | ModifierFlag::NONE,
KeyCode::BRACKET_RIGHT, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L
</autogen>
<autogen>
__KeyToKey__
KeyCode::BRACKET_RIGHT, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
KeyCode::BRACKET_LEFT, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L
</autogen>
</item>
</root>
@dracos
Copy link
Author

dracos commented Dec 17, 2014

By default, a Mac maps alt-[ to “, shift-alt-[ to ”, alt-] to ‘ and shift-alt-] to ’. Which is clearly madness. With the above config and https://pqrs.org/osx/karabiner/ it instead maps alt-[ to ‘, alt-] to ’, shift-alt-[ to “ and shift-alt-] to ”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment