From a9e63c369ead214140f917a33c986bdbe14c8e2b Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Fri, 7 Feb 2020 16:58:56 -0800 Subject: [PATCH] karabiner: Add karabiner-elements config --- darwin.conf.yaml | 3 +- karabiner/.gitignore | 2 + karabiner/karabiner.json | 144 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 karabiner/.gitignore create mode 100644 karabiner/karabiner.json diff --git a/darwin.conf.yaml b/darwin.conf.yaml index ab1b8d0..d7d1bbf 100644 --- a/darwin.conf.yaml +++ b/darwin.conf.yaml @@ -6,6 +6,7 @@ quiet: false - link: - ~/.config/zsh/os.zshrc: zsh/darwin.zshrc ~/.config/git/config-os: git/config-darwin + ~/.config/karabiner: karabiner/ ~/.config/nvim/os-plugins.vim: neovim/darwin-plugins.vim + ~/.config/zsh/os.zshrc: zsh/darwin.zshrc diff --git a/karabiner/.gitignore b/karabiner/.gitignore new file mode 100644 index 0000000..4ca906e --- /dev/null +++ b/karabiner/.gitignore @@ -0,0 +1,2 @@ +/assets +/automatic_backups diff --git a/karabiner/karabiner.json b/karabiner/karabiner.json new file mode 100644 index 0000000..f967542 --- /dev/null +++ b/karabiner/karabiner.json @@ -0,0 +1,144 @@ +{ + "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": "Toggle caps_lock by pressing left_shift + right_shift at the same time", + "manipulators": [ + { + "from": { + "key_code": "left_shift", + "modifiers": { + "mandatory": [ + "right_shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "caps_lock" + } + ], + "to_if_alone": [ + { + "key_code": "left_shift" + } + ], + "type": "basic" + }, + { + "from": { + "key_code": "right_shift", + "modifiers": { + "mandatory": [ + "left_shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "caps_lock" + } + ], + "to_if_alone": [ + { + "key_code": "right_shift" + } + ], + "type": "basic" + } + ] + } + ] + }, + "devices": [ + { + "disable_built_in_keyboard_if_exists": false, + "fn_function_keys": [], + "identifiers": { + "is_keyboard": true, + "is_pointing_device": false, + "product_id": 24866, + "vendor_id": 7504 + }, + "ignore": true, + "manipulate_caps_lock_led": false, + "simple_modifications": [] + }, + { + "disable_built_in_keyboard_if_exists": false, + "fn_function_keys": [], + "identifiers": { + "is_keyboard": true, + "is_pointing_device": false, + "product_id": 636, + "vendor_id": 1452 + }, + "ignore": false, + "manipulate_caps_lock_led": true, + "simple_modifications": [ + { + "from": { + "key_code": "caps_lock" + }, + "to": { + "key_code": "escape" + } + }, + { + "from": { + "key_code": "right_option" + }, + "to": { + "key_code": "right_control" + } + } + ] + }, + { + "disable_built_in_keyboard_if_exists": false, + "fn_function_keys": [], + "identifiers": { + "is_keyboard": true, + "is_pointing_device": false, + "product_id": 50475, + "vendor_id": 1133 + }, + "ignore": false, + "manipulate_caps_lock_led": false, + "simple_modifications": [] + } + ], + "fn_function_keys": [], + "name": "Default profile", + "parameters": { + "delay_milliseconds_before_open_device": 1000 + }, + "selected": true, + "simple_modifications": [], + "virtual_hid_keyboard": { + "country_code": 0, + "mouse_key_xy_scale": 100 + } + } + ] +}