Skip to content

Instantly share code, notes, and snippets.

@dracos
Created Dec 17, 2014
Embed
What would you like to do?
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