Skip to content

Instantly share code, notes, and snippets.

@peruibeloko
Created February 14, 2025 00:47
Show Gist options
  • Save peruibeloko/78548dc233bd786a3a2a36515132e54e to your computer and use it in GitHub Desktop.
Save peruibeloko/78548dc233bd786a3a2a36515132e54e to your computer and use it in GitHub Desktop.
My Karabiner-Elements config for an ABNT2 external keyboard (Redragon APS)
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": false,
"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": [
{
"description": "Ctrl -> Cmd",
"manipulators": [
{
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_command",
"lazy": true
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_command",
"lazy": true
}
],
"type": "basic"
}
]
},
{
"description": "Cmd + Arrow -> Opt + Arrow",
"manipulators": [
{
"from": {
"key_code": "up_arrow",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": ["option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "down_arrow",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "down_arrow",
"modifiers": ["option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_arrow",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": ["option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_arrow",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": ["option"]
}
],
"type": "basic"
}
]
},
{
"description": "Cmd + Shift + Arrow -> Opt + Shift + Arrow",
"manipulators": [
{
"from": {
"key_code": "up_arrow",
"modifiers": {
"mandatory": ["command", "shift"]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": ["option", "shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "down_arrow",
"modifiers": {
"mandatory": ["command", "shift"]
}
},
"to": [
{
"key_code": "down_arrow",
"modifiers": ["option", "shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_arrow",
"modifiers": {
"mandatory": ["command", "shift"]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": ["option", "shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_arrow",
"modifiers": {
"mandatory": ["command", "shift"]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": ["option", "shift"]
}
],
"type": "basic"
}
]
},
{
"description": "Alt + Tab -> Cmd + 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"
}
]
},
{
"description": "Cmd + Home/End -> Cmd + Up/Down",
"manipulators": [
{
"from": {
"key_code": "home"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": ["command"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "end"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": ["command"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "home",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": ["command"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "end",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "down_arrow",
"modifiers": ["command"]
}
],
"type": "basic"
}
]
},
{
"description": "Cmd + Del/Backspace -> Opt + Del/Backspace",
"manipulators": [
{
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": ["option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "delete_forward",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "delete_forward",
"modifiers": ["option"]
}
],
"type": "basic"
}
]
},
{
"description": "ABNT2",
"manipulators": [
{
"from": {
"key_code": "slash",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "semicolon"
}
],
"type": "basic"
},
{
"from": {
"key_code": "international1",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "slash"
}
],
"type": "basic"
},
{
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": ["shift"]
}
},
"to": [
{
"key_code": "quote"
},
{
"key_code": "c",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "quote"
},
{
"key_code": "c"
}
],
"type": "basic"
},
{
"from": {
"key_code": "close_bracket",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"from": {
"key_code": "open_bracket"
},
"to": [
{
"key_code": "quote"
}
],
"type": "basic"
},
{
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": ["shift"]
}
},
"to": [
{
"key_code": "non_us_backslash"
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_pound",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "close_bracket"
}
],
"type": "basic"
},
{
"from": {
"key_code": "quote"
},
"to": [
{
"key_code": "non_us_backslash",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": ["shift"]
}
},
"to": [
{
"key_code": "6",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "quote"
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "backslash"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 610,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 610,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 1861,
"vendor_id": 1118
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 1861,
"vendor_id": 1118
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": true,
"product_id": 20480,
"vendor_id": 12815
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 20480,
"vendor_id": 12815
},
"ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": 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
}
},
{
"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": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 610,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 610,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 1861,
"vendor_id": 1118
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 1861,
"vendor_id": 1118
},
"ignore": true,
"manipulate_caps_lock_led": false,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": true,
"product_id": 20480,
"vendor_id": 12815
},
"ignore": true,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 20480,
"vendor_id": 12815
},
"ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": 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": "Vanilla",
"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
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment