Skip to content

Instantly share code, notes, and snippets.

@flostellbrink
Last active May 6, 2024 13:10
Show Gist options
  • Save flostellbrink/5ef16cd6c9b1d0babf88e543bd129bed to your computer and use it in GitHub Desktop.
Save flostellbrink/5ef16cd6c9b1d0babf88e543bd129bed to your computer and use it in GitHub Desktop.
Karabiner-Elements Rules
{
"description": "⌘-enter to send in Apple Mail",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.mail"
],
"description": "Only for Apple Mail",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "d",
"modifiers": [
"shift",
"command"
]
}
],
"type": "basic"
}
]
}
{
"description": "⌘-number to switch profile in Safari",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "0",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "1",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "2",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "3",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "4",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "4",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "5",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "6",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "7",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "8",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.Safari"
],
"description": "Only for Safari",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": [
"shift",
"option",
"command"
]
}
],
"type": "basic"
}
]
}
{
"description": "⌘-r to refresh in Apple Mail",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.mail"
],
"description": "Only for Apple Mail",
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "n",
"modifiers": [
"shift",
"command"
]
}
],
"type": "basic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment