From 580ae5315181789ac9f2e827482ac97ac27018b8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 28 May 2018 13:48:02 -0700 Subject: some karabiner fixups --- .../complex_modifications/command-escape.json | 24 +++++- .../complex_modifications/terminal-overrides.json | 5 ++ config/karabiner/karabiner.json | 90 ++++++++++++++++++++-- 3 files changed, 110 insertions(+), 9 deletions(-) (limited to 'config') diff --git a/config/karabiner/assets/complex_modifications/command-escape.json b/config/karabiner/assets/complex_modifications/command-escape.json index 03c6167..f00158c 100644 --- a/config/karabiner/assets/complex_modifications/command-escape.json +++ b/config/karabiner/assets/complex_modifications/command-escape.json @@ -2,9 +2,9 @@ "title": "Map Command to Escape when pressed alone", "rules": [ { + "description": "Map command to escape", "manipulators": [ { - "description": "Map left command to escape", "type": "basic", "from": { "key_code": "left_command", @@ -25,6 +25,28 @@ "key_code": "escape" } ] + }, + { + "type": "basic", + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_command", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "escape" + } + ] } ] } diff --git a/config/karabiner/assets/complex_modifications/terminal-overrides.json b/config/karabiner/assets/complex_modifications/terminal-overrides.json index f15ac37..594d9e6 100644 --- a/config/karabiner/assets/complex_modifications/terminal-overrides.json +++ b/config/karabiner/assets/complex_modifications/terminal-overrides.json @@ -85,6 +85,11 @@ "lazy": true } ], + "to_if_alone": [ + { + "key_code": "escape" + } + ], "conditions": [ { "type": "frontmost_application_if", diff --git a/config/karabiner/karabiner.json b/config/karabiner/karabiner.json index 203bed9..9bf0cbb 100644 --- a/config/karabiner/karabiner.json +++ b/config/karabiner/karabiner.json @@ -110,6 +110,11 @@ "lazy": true } ], + "to_if_alone": [ + { + "key_code": "escape" + } + ], "type": "basic" }, { @@ -145,9 +150,9 @@ ] }, { + "description": "Map command to escape", "manipulators": [ { - "description": "Map left command to escape", "from": { "key_code": "left_command", "modifiers": { @@ -168,6 +173,28 @@ } ], "type": "basic" + }, + { + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_command", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "escape" + } + ], + "type": "basic" } ] }, @@ -782,6 +809,14 @@ "key_code": "left_command" } }, + { + "from": { + "key_code": "right_command" + }, + "to": { + "key_code": "right_option" + } + }, { "from": { "key_code": "right_option" @@ -789,14 +824,52 @@ "to": { "key_code": "right_command" } + } + ] + }, + { + "disable_built_in_keyboard_if_exists": false, + "fn_function_keys": [], + "identifiers": { + "is_keyboard": true, + "is_pointing_device": false, + "product_id": 2082, + "vendor_id": 6134 + }, + "ignore": false, + "manipulate_caps_lock_led": false, + "simple_modifications": [ + { + "from": { + "key_code": "left_alt" + }, + "to": { + "key_code": "left_command" + } }, { "from": { - "key_code": "right_command" + "key_code": "left_gui" + }, + "to": { + "key_code": "left_option" + } + }, + { + "from": { + "key_code": "right_alt" }, "to": { "key_code": "right_option" } + }, + { + "from": { + "key_code": "right_gui" + }, + "to": { + "key_code": "right_command" + } } ] } @@ -904,15 +977,15 @@ "simple_modifications": [ { "from": { - "key_code": "caps_lock" + "consumer_key_code": "fastforward" }, "to": { - "key_code": "fn" + "key_code": "vk_none" } }, { "from": { - "consumer_key_code": "rewind" + "consumer_key_code": "play_or_pause" }, "to": { "key_code": "vk_none" @@ -920,7 +993,7 @@ }, { "from": { - "consumer_key_code": "play_or_pause" + "consumer_key_code": "rewind" }, "to": { "key_code": "vk_none" @@ -928,15 +1001,16 @@ }, { "from": { - "consumer_key_code": "fastforward" + "key_code": "caps_lock" }, "to": { - "key_code": "vk_none" + "key_code": "fn" } } ], "virtual_hid_keyboard": { "caps_lock_delay_milliseconds": 0, + "country_code": 0, "keyboard_type": "ansi" } } -- cgit v1.2.3-54-g00ecf