Skip to content

Instantly share code, notes, and snippets.

@digfish
Created April 1, 2023 23:33
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 digfish/4c616d59e74b7907686719208ac488af to your computer and use it in GitHub Desktop.
Save digfish/4c616d59e74b7907686719208ac488af to your computer and use it in GitHub Desktop.
Karabiner.json for use with Portuguese PC keyboard
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": 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": []
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 2310,
"vendor_id": 1455
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 2310,
"vendor_id": 1455
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 13330,
"vendor_id": 14
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 20480,
"vendor_id": 2821
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"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": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"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": false,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
},
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 150,
"basic.to_if_alone_timeout_milliseconds": 500,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "Brackets",
"manipulators": [
{
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"right_option"
]
}
},
"to": [
{
"key_code": "8",
"modifiers": [
"shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"right_option"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": [
"shift",
"right_option"
]
}
],
"type": "basic"
}
]
},
{
"description": "Portuguese Accents",
"manipulators": [
{
"from": {
"key_code": "backslash"
},
"to": [
{
"key_code": "quote"
}
],
"type": "basic"
},
{
"from": {
"key_code": "backslash",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "quote",
"modifiers": [
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Portuguese Symbols",
"manipulators": [
{
"from": {
"key_code": "quote"
},
"to": [
{
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "open_bracket",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "open_bracket"
},
"to": [
{
"key_code": "equal_sign"
}
],
"type": "basic"
},
{
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "equal_sign",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_backslash"
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde"
},
"to": [
{
"key_code": "backslash"
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "backslash",
"modifiers": [
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Modifier keys change",
"manipulators": [
{
"from": {
"key_code": "left_option",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"key_code": "left_control",
"modifiers": [
"any"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_command",
"modifiers": {
"mandatory": [
"left_shift"
]
}
},
"to": [
{
"key_code": "fn",
"modifiers": [
"any"
]
}
],
"type": "basic"
}
]
},
{
"description": "exchange tilde with backslash",
"manipulators": [
{
"from": {
"key_code": "non_us_backslash"
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": [
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "f5 for screenshot",
"manipulators": [
{
"from": {
"key_code": "f5"
},
"to": [
{
"key_code": "3",
"modifiers": [
"command",
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Lock key for windows",
"manipulators": [
{
"from":
{
"key_code": "l",
"modifiers": [
"left_command"
]
},
"to": [ {
"key_code":"q",
"modifiers": [
"command","control"
]
}]
}
]
},
{
"description": "Option+Backtick to Command+Backtick",
"manipulators": [
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"mandatory": [
"left_option"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": "command"
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"mandatory": [
"right_option"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": "command"
}
],
"type": "basic"
}
]
},
{
"description": "Option+Tab to Command+Tab",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
"left_option"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "tab",
"modifiers": "command"
}
],
"type": "basic"
},
{
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
"right_option"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "tab",
"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": 2310,
"vendor_id": 1455
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 2310,
"vendor_id": 1455
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"software_function": {
"iokit_power_management_sleep_system": {}
}
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"key_code": "f2"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"key_code": "f5"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"apple_vendor_keyboard_key_code": "launchpad"
}
]
}
],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 20480,
"vendor_id": 2821
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"apple_vendor_top_case_key_code": "keyboard_fn"
},
"to": [
{
"apple_vendor_top_case_key_code": "keyboard_fn"
}
]
},
{
"from": {
"consumer_key_code": "ac_home"
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"from": {
"key_code": "application"
},
"to": [
{
"pointing_button": "button2"
}
]
},
{
"from": {
"key_code": "left_control"
},
"to": [
{
"key_code": "left_command"
}
]
}
],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 13330,
"vendor_id": 14
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"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": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"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",
"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
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment