Advertisement
Guest User

Karabiner Elements Ctrl Caps Lock Macro

a guest
Dec 17th, 2018
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.54 KB | None | 0 0
  1. {
  2.     "title": "Map Left Control 2x to Caps Lock",
  3.     "rules": [
  4.     {
  5.         "description": "Map Left Control 2x to Caps Lock",
  6.         "manipulators": [
  7.         {
  8.             "type": "basic",
  9.             "from": {
  10.                 "key_code": "left_control",
  11.                 "modifiers": {
  12.                     "optional": [
  13.                         "any"
  14.                     ]
  15.                 }
  16.             },
  17.             "to": [
  18.                 {
  19.                     "key_code": "caps_lock"
  20.                 }
  21.             ],
  22.             "conditions": [
  23.                 {
  24.                     "type": "variable_if",
  25.                     "name": "left_control pressed",
  26.                     "value": 1
  27.                 }
  28.             ]
  29.         },
  30.  
  31.         {
  32.             "type": "basic",
  33.             "from": {
  34.                 "key_code": "left_control",
  35.                 "modifiers": {
  36.                     "optional": [
  37.                         "any"
  38.                     ]
  39.                 }
  40.             },
  41.             "to": [
  42.                 {
  43.                     "set_variable": {
  44.                         "name": "left_control pressed",
  45.                         "value": 1
  46.                     }
  47.                 },
  48.                 {
  49.                     "key_code": "left_control"
  50.                 }
  51.             ],
  52.             "to_delayed_action": {
  53.                 "to_if_invoked": [
  54.                     {
  55.                         "set_variable": {
  56.                             "name": "left_control pressed",
  57.                             "value": 0
  58.                         }
  59.                     }
  60.                 ],
  61.                 "to_if_canceled": [
  62.                     {
  63.                         "set_variable": {
  64.                             "name": "left_control pressed",
  65.                             "value": 0
  66.                         }
  67.                     }
  68.                 ]
  69.             }
  70.         }
  71.         ]
  72.     }
  73.     ]
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement