Advertisement
Guest User

Karabiner Elements Double Shift Macro

a guest
Dec 17th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.72 KB | None | 0 0
  1. {
  2.     "title": "Both shift = backspace. Both shift 2x = delete word.",
  3.     "rules": [
  4.     {
  5.         "description": "Both shift = backspace. Both shift 2x = delete word.",
  6.         "manipulators": [
  7.         {
  8.             "type": "basic",
  9.             "from": {
  10.                 "simultaneous": [
  11.                     {
  12.                         "key_code": "left_shift"
  13.                     },
  14.                     {
  15.                         "key_code": "right_shift"
  16.                     }
  17.                 ],
  18.                 "modifiers": {
  19.                     "optional": [
  20.                         "any"
  21.                     ]
  22.                 }
  23.             },
  24.             "to": [
  25.                 {
  26.                     "key_code": "delete_or_backspace",
  27.                     "modifiers":[
  28.                         "right_option"
  29.                     ]
  30.                 }
  31.             ],
  32.             "conditions": [
  33.                 {
  34.                     "type": "variable_if",
  35.                     "name": "both_shift pressed",
  36.                     "value": 1
  37.                 }
  38.             ]
  39.         },
  40.  
  41.         {
  42.             "type": "basic",
  43.             "from": {
  44.                 "simultaneous": [
  45.                     {
  46.                         "key_code": "left_shift"
  47.                     },
  48.                     {
  49.                         "key_code": "right_shift"
  50.                     }
  51.                 ],
  52.                 "modifiers": {
  53.                     "optional": [
  54.                         "any"
  55.                     ]
  56.                 }
  57.             },
  58.             "to": [
  59.                 {
  60.                     "set_variable": {
  61.                         "name": "both_shift pressed",
  62.                         "value": 1
  63.                     }
  64.                 },
  65.                 {
  66.                     "key_code": "delete_or_backspace"
  67.                 }
  68.             ],
  69.             "to_delayed_action": {
  70.                 "to_if_invoked": [
  71.                     {
  72.                         "set_variable": {
  73.                             "name": "both_shift pressed",
  74.                             "value": 0
  75.                         }
  76.                     }
  77.                 ],
  78.                 "to_if_canceled": [
  79.                     {
  80.                         "set_variable": {
  81.                             "name": "both_shift pressed",
  82.                             "value": 0
  83.                         }
  84.                     }
  85.                 ]
  86.             }
  87.         }
  88.         ]
  89.     }
  90.     ]
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement