Skip to content

Instantly share code, notes, and snippets.

@eyemyth
Last active November 22, 2022 04:22
Show Gist options
  • Save eyemyth/db4f923bcbd640b2d71a5f3fa0670e3a to your computer and use it in GitHub Desktop.
Save eyemyth/db4f923bcbd640b2d71a5f3fa0670e3a to your computer and use it in GitHub Desktop.
Complex modification rules for Karabiner Elements to map shift keys to parentheses. Use the URL in the comment to import easily.
{
"title": "Shift keys to parentheses",
"rules": [
{
"description": "map left shift to opening parenthesis",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "9",
"modifiers": [
"left_shift"
]
}
],
"to": [
{
"key_code": "left_shift",
"modifiers": []
}
]
}
]
},
{
"description": "map right shift to closing parenthesis",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "0",
"modifiers": [
"right_shift"
]
}
],
"to": [
{
"key_code": "right_shift",
"modifiers": []
}
]
}
]
}
]
}
@eyemyth
Copy link
Author

eyemyth commented Aug 7, 2017

karabiner://karabiner/assets/complex_modifications/import?url=https%3A%2F%2Fgist.githubusercontent.com%2Feyemyth%2Fdb4f923bcbd640b2d71a5f3fa0670e3a%2Fraw%2Fe62566f8db8985c07eb33df9459f247561218614%2Fshift_to_parentheses.json

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