1
0
mirror of https://github.com/danbee/dotfiles-local synced 2025-03-04 08:49:07 +00:00

Add Karabiner-elements configuration

This commit is contained in:
Daniel Barber 2017-11-20 13:50:47 -05:00
parent b8bf3fac43
commit 4aee08553a
3 changed files with 605 additions and 0 deletions

View File

@ -0,0 +1,248 @@
{
"title": "Vi Style Arrows",
"rules": [
{
"description": "Change Control + h/j/k/l to Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
]
}
]
},
{
"description": "Change Option + h/j/k/l to Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
]
}
]
},
{
"description": "Change Fn + h/j/k/l to Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
]
}
]
}
]
}

View File

@ -0,0 +1,69 @@
{
"title": "Change grave accent (backtick) to escape, option grave accent to grave accent",
"rules": [
{
"description": "Post Escape if grave_accent_and_tilde (backtick) is pressed alone; post grave_accent (backtick) if Option + grave_accent_and_tilde is pressed.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": [
"left_command"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": [
"left_command"
]
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
},
{
"type": "basic",
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": [
"left_control"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": [
"left_control"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": [
"left_option"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
]
}
]
}
]
}

View File

@ -0,0 +1,288 @@
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000
},
"rules": [
{
"description": "Change Fn + h/j/k/l to Arrows",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
},
{
"description": "Change § key to escape with Fn-§ for original character and put backtick where it should be",
"manipulators": [
{
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"mandatory": [
"fn"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "grave_accent_and_tilde"
}
],
"type": "basic"
},
{
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "non_us_backslash"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 632,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "caps_lock"
},
"to": {
"key_code": "left_control"
}
}
]
}
],
"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": {
"key_code": "mission_control"
}
},
{
"from": {
"key_code": "f4"
},
"to": {
"key_code": "launchpad"
}
},
{
"from": {
"key_code": "f5"
},
"to": {
"key_code": "illumination_decrement"
}
},
{
"from": {
"key_code": "f6"
},
"to": {
"key_code": "illumination_increment"
}
},
{
"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": "fastforward"
}
},
{
"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",
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"keyboard_type": "iso"
}
}
]
}