Skip to content

Instantly share code, notes, and snippets.

@euclid1990
Last active October 9, 2024 06:52
Show Gist options
  • Save euclid1990/ee6ed30164c8936f0cecba0194b1b8b4 to your computer and use it in GitHub Desktop.
Save euclid1990/ee6ed30164c8936f0cecba0194b1b8b4 to your computer and use it in GitHub Desktop.
Karabiner Complex Modification Rules - OSX + Filco/Durgod/Akko/LeoPold
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "print_screen to command+shift+3",
"manipulators": [
{
"from": {
"key_code": "print_screen"
},
"to": [
{
"key_code": "3",
"modifiers": ["left_command", "left_shift"]
}
],
"type": "basic"
}
]
},
{
"description": "shift+print_screen to command+control+shift+4",
"manipulators": [
{
"from": {
"key_code": "print_screen",
"modifiers": {
"optional": ["left_shift", "right_shift"]
}
},
"to": [
{
"key_code": "4",
"modifiers": ["left_control", "left_command", "left_shift"]
}
],
"type": "basic"
}
]
},
{
"description": "command+print_screen to command+shift+4",
"manipulators": [
{
"from": {
"key_code": "print_screen",
"modifiers": {
"optional": ["left_shift", "right_shift"]
}
},
"to": [
{
"key_code": "4",
"modifiers": ["left_command", "left_shift"]
}
],
"type": "basic"
}
]
},
{
"description": "pause to command+control+q",
"manipulators": [
{
"from": {
"key_code": "pause"
},
"to": [
{
"key_code": "q",
"modifiers": ["left_command", "left_control"]
}
],
"type": "basic"
}
]
},
{
"description": "scroll_lock to control+space",
"manipulators": [
{
"from": {
"key_code": "scroll_lock"
},
"to": [
{
"key_code": "spacebar",
"modifiers": ["left_control"]
}
],
"type": "basic"
}
]
},
{
"description": "shift+enter to command+enter / custom Slack send messages",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^com\\.tinyspeck\\.slackmacgap$"],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["shift"]
}
},
"to": [
{
"key_code": "return_or_enter",
"modifiers": ["right_command"]
}
],
"type": "basic"
}
]
},
{
"description": "Mouse forward button to forward in Finder",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^com\\.apple\\.finder"],
"type": "frontmost_application_if"
}
],
"from": {
"pointing_button": "button5"
},
"to": [
{
"key_code": "close_bracket",
"modifiers": ["command"]
}
],
"type": "basic"
}
]
},
{
"description": "Mouse backward button to backward in Finder",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^com\\.apple\\.finder"],
"type": "frontmost_application_if"
}
],
"from": {
"pointing_button": "button4"
},
"to": [
{
"key_code": "open_bracket",
"modifiers": ["command"]
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 130,
"vendor_id": 12136
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "application"
},
"to": [
{
"key_code": "right_command"
}
]
},
{
"from": {
"key_code": "left_command"
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"from": {
"key_code": "left_option"
},
"to": [
{
"key_code": "left_command"
}
]
}
]
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 45093,
"vendor_id": 1133
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "launchpad"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"apple_vendor_top_case_key_code": "illumination_down"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"apple_vendor_top_case_key_code": "illumination_up"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}
# How to get Bundle ID of Mac application?
$ osascript -e 'id of app "/Applications/Slack.app"'
$ osascript -e 'id of app "/System/Library/CoreServices/Finder.app"'
# Or go to https://offcornerdev.com/bundleid.html
@Dylan-Bollard
Copy link

This actually helped a lot my man.

Hope all is well!

@MindseyeX
Copy link

Ultimately what worked for me was

/Users/USERNAME/.config/karabiner/karabiner.json <—edit this to customize

This was after importing a file from their website which was similar to what I needed but not exactly. Thanks to everyone who posted in this thread.

@euclid1990
Copy link
Author

euclid1990 commented Dec 10, 2021

you can use vim ~/.config/karabiner/karabiner.json to edit this file

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