Advertisement
ucomesdag

Karabiner Complex Modifications

Aug 30th, 2022 (edited)
760
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 17.29 KB | None | 0 0
  1. {
  2.  "__INSTALL_URL__": "karabiner://karabiner/assets/complex_modifications/import?url=https://pastebin.com/raw/MSpDNh4p",
  3.  "title": "Karabiner Rules",
  4.  "rules": [
  5.     {
  6.       "description": "Shift + Esc to ~",
  7.       "manipulators": [
  8.         {
  9.           "type": "basic",
  10.           "from": {
  11.             "key_code": "escape",
  12.             "modifiers": {
  13.               "mandatory": [
  14.                 "shift"
  15.               ]
  16.             }
  17.           },
  18.           "to": [
  19.             {
  20.               "repeat": true,
  21.               "key_code": "grave_accent_and_tilde",
  22.               "modifiers": [
  23.                 "left_shift"
  24.               ]
  25.             }
  26.           ]
  27.         }
  28.       ]
  29.     },
  30.     {
  31.       "description": "Control + Esc to `",
  32.       "manipulators": [
  33.         {
  34.           "type": "basic",
  35.           "from": {
  36.             "key_code": "escape",
  37.             "modifiers": {
  38.               "mandatory": [
  39.                 "control"
  40.               ]
  41.             }
  42.           },
  43.           "to": [
  44.             {
  45.               "key_code": "grave_accent_and_tilde",
  46.               "modifiers": []
  47.             }
  48.           ]
  49.         }
  50.       ]
  51.     },
  52.     {
  53.       "description": "Finder: Delete as Move to Trash",
  54.       "manipulators": [
  55.         {
  56.           "type": "basic",
  57.           "from": {
  58.             "key_code": "delete_forward",
  59.             "modifiers": {
  60.               "optional": ["any"]
  61.             }
  62.           },
  63.           "to": [
  64.             {
  65.               "key_code": "delete_or_backspace",
  66.               "modifiers": ["left_alt"]
  67.             }
  68.           ],
  69.           "conditions": [
  70.             {
  71.               "type": "frontmost_application_if",
  72.               "bundle_identifiers": [
  73.                 "^com.apple.finder"
  74.               ]
  75.             }
  76.           ]
  77.         }
  78.       ]
  79.     },
  80.     {
  81.       "description": "iTerm2: Fix Delete to forward delete",
  82.       "manipulators": [
  83.         {
  84.           "type": "basic",
  85.           "from": {
  86.             "key_code": "delete_forward",
  87.             "modifiers": {
  88.               "optional": ["any"]
  89.             }
  90.           },
  91.           "to": [
  92.           {
  93.             "key_code": "delete_forward",
  94.             "modifiers": ["left_control"]
  95.           }
  96.           ],
  97.           "conditions": [
  98.             {
  99.               "type": "frontmost_application_if",
  100.               "bundle_identifiers": [
  101.                 "^com.googlecode.iterm2",
  102.                 "^org.virtualbox.app.VirtualBoxVM"
  103.               ]
  104.             }
  105.           ]
  106.         }
  107.       ]
  108.     },
  109.     {
  110.       "description": "VirtualBox: Fix Delete to forward delete",
  111.       "manipulators": [
  112.         {
  113.           "type": "basic",
  114.           "from": {
  115.             "key_code": "delete_forward",
  116.             "modifiers": {
  117.               "optional": ["any"]
  118.             }
  119.           },
  120.           "to": [
  121.           {
  122.             "key_code": "d",
  123.             "modifiers": ["left_control"]
  124.           }
  125.           ],
  126.           "conditions": [
  127.             {
  128.               "type": "frontmost_application_if",
  129.               "bundle_identifiers": [
  130.                 "^com.googlecode.iterm2",
  131.                 "^org.virtualbox.app.VirtualBoxVM"
  132.               ]
  133.             }
  134.           ]
  135.         }
  136.       ]
  137.     },
  138.  
  139.     {
  140.       "description": "IDE: Fix fucntion keys",
  141.       "manipulators": [
  142.         {
  143.           "type": "basic",
  144.           "from": {
  145.             "key_code": "f1"
  146.           },
  147.           "to": [
  148.             {
  149.               "key_code": "f1",
  150.               "modifiers": [
  151.                 "fn"
  152.               ]
  153.             }
  154.           ],
  155.           "conditions": [
  156.             {
  157.               "type": "frontmost_application_if",
  158.               "bundle_identifiers": [
  159.                 "^org.qt-project.qtcreator",
  160.                 "^com.sublimetext.3"
  161.               ]
  162.             }
  163.           ]
  164.         },
  165.         {
  166.           "type": "basic",
  167.           "from": {
  168.             "key_code": "f2"
  169.           },
  170.           "to": [
  171.             {
  172.               "key_code": "f2",
  173.               "modifiers": [
  174.                 "fn"
  175.               ]
  176.             }
  177.           ],
  178.           "conditions": [
  179.             {
  180.               "type": "frontmost_application_if",
  181.               "bundle_identifiers": [
  182.                 "^org.qt-project.qtcreator",
  183.                 "^com.sublimetext.3"
  184.               ]
  185.             }
  186.           ]
  187.         },
  188.         {
  189.           "type": "basic",
  190.           "from": {
  191.             "key_code": "f3"
  192.           },
  193.           "to": [
  194.             {
  195.               "key_code": "f3",
  196.               "modifiers": [
  197.                 "fn"
  198.               ]
  199.             }
  200.           ],
  201.           "conditions": [
  202.             {
  203.               "type": "frontmost_application_if",
  204.               "bundle_identifiers": [
  205.                 "^org.qt-project.qtcreator",
  206.                 "^com.sublimetext.3"
  207.               ]
  208.             }
  209.           ]
  210.         },
  211.         {
  212.           "type": "basic",
  213.           "from": {
  214.             "key_code": "f4"
  215.           },
  216.           "to": [
  217.             {
  218.               "key_code": "f4",
  219.               "modifiers": [
  220.                 "fn"
  221.               ]
  222.             }
  223.           ],
  224.           "conditions": [
  225.             {
  226.               "type": "frontmost_application_if",
  227.               "bundle_identifiers": [
  228.                 "^org.qt-project.qtcreator",
  229.                 "^com.sublimetext.3"
  230.               ]
  231.             }
  232.           ]
  233.         },
  234.         {
  235.           "type": "basic",
  236.           "from": {
  237.             "key_code": "f5"
  238.           },
  239.           "to": [
  240.             {
  241.               "key_code": "f5",
  242.               "modifiers": [
  243.                 "fn"
  244.               ]
  245.             }
  246.           ],
  247.           "conditions": [
  248.             {
  249.               "type": "frontmost_application_if",
  250.               "bundle_identifiers": [
  251.                 "^org.qt-project.qtcreator",
  252.                 "^com.sublimetext.3"
  253.               ]
  254.             }
  255.           ]
  256.         },
  257.         {
  258.           "type": "basic",
  259.           "from": {
  260.             "key_code": "f6"
  261.           },
  262.           "to": [
  263.             {
  264.               "key_code": "f6",
  265.               "modifiers": [
  266.                 "fn"
  267.               ]
  268.             }
  269.           ],
  270.           "conditions": [
  271.             {
  272.               "type": "frontmost_application_if",
  273.               "bundle_identifiers": [
  274.                 "^org.qt-project.qtcreator",
  275.                 "^com.sublimetext.3"
  276.               ]
  277.             }
  278.           ]
  279.         },
  280.         {
  281.           "type": "basic",
  282.           "from": {
  283.             "key_code": "f7"
  284.           },
  285.           "to": [
  286.             {
  287.               "key_code": "f7",
  288.               "modifiers": [
  289.                 "fn"
  290.               ]
  291.             }
  292.           ],
  293.           "conditions": [
  294.             {
  295.               "type": "frontmost_application_if",
  296.               "bundle_identifiers": [
  297.                 "^org.qt-project.qtcreator",
  298.                 "^com.sublimetext.3"
  299.               ]
  300.             }
  301.           ]
  302.         },
  303.         {
  304.           "type": "basic",
  305.           "from": {
  306.             "key_code": "f8"
  307.           },
  308.           "to": [
  309.             {
  310.               "key_code": "f8",
  311.               "modifiers": [
  312.                 "fn"
  313.               ]
  314.             }
  315.           ],
  316.           "conditions": [
  317.             {
  318.               "type": "frontmost_application_if",
  319.               "bundle_identifiers": [
  320.                 "^org.qt-project.qtcreator",
  321.                 "^com.sublimetext.3"
  322.               ]
  323.             }
  324.           ]
  325.         },
  326.         {
  327.           "type": "basic",
  328.           "from": {
  329.             "key_code": "f9"
  330.           },
  331.           "to": [
  332.             {
  333.               "key_code": "f9",
  334.               "modifiers": [
  335.                 "fn"
  336.               ]
  337.             }
  338.           ],
  339.           "conditions": [
  340.             {
  341.               "type": "frontmost_application_if",
  342.               "bundle_identifiers": [
  343.                 "^org.qt-project.qtcreator",
  344.                 "^com.sublimetext.3"
  345.               ]
  346.             }
  347.           ]
  348.         },
  349.         {
  350.           "type": "basic",
  351.           "from": {
  352.             "key_code": "f10"
  353.           },
  354.           "to": [
  355.             {
  356.               "key_code": "f10",
  357.               "modifiers": [
  358.                 "fn"
  359.               ]
  360.             }
  361.           ],
  362.           "conditions": [
  363.             {
  364.               "type": "frontmost_application_if",
  365.               "bundle_identifiers": [
  366.                 "^org.qt-project.qtcreator",
  367.                 "^com.sublimetext.3"
  368.               ]
  369.             }
  370.           ]
  371.         },
  372.         {
  373.           "type": "basic",
  374.           "from": {
  375.             "key_code": "f11"
  376.           },
  377.           "to": [
  378.             {
  379.               "key_code": "f11",
  380.               "modifiers": [
  381.                 "fn"
  382.               ]
  383.             }
  384.           ],
  385.           "conditions": [
  386.             {
  387.               "type": "frontmost_application_if",
  388.               "bundle_identifiers": [
  389.                 "^org.qt-project.qtcreator",
  390.                 "^com.sublimetext.3"
  391.               ]
  392.             }
  393.           ]
  394.         },
  395.         {
  396.           "type": "basic",
  397.           "from": {
  398.             "key_code": "f12"
  399.           },
  400.           "to": [
  401.             {
  402.               "key_code": "f12",
  403.               "modifiers": [
  404.                 "fn"
  405.               ]
  406.             }
  407.           ],
  408.           "conditions": [
  409.             {
  410.               "type": "frontmost_application_if",
  411.               "bundle_identifiers": [
  412.                 "^org.qt-project.qtcreator",
  413.                 "^com.sublimetext.3"
  414.               ]
  415.             }
  416.           ]
  417.         }
  418.  
  419.  
  420.       ]
  421.     },
  422.  
  423.     {
  424.       "description": "Home key to the beginning of the line (Control + a)",
  425.       "manipulators": [
  426.         {
  427.           "type": "basic",
  428.           "from": {
  429.             "key_code": "home",
  430.             "modifiers": {
  431.               "optional": [
  432.                 "any"
  433.               ]
  434.             }
  435.           },
  436.           "to": [
  437.             {
  438.               "key_code": "a",
  439.               "modifiers": [
  440.                 "left_control"
  441.               ]
  442.             }
  443.           ]
  444.         }
  445.       ]
  446.     },
  447.     {
  448.       "description": "End key to the end of the line (Control + e)",
  449.       "manipulators": [
  450.         {
  451.           "type": "basic",
  452.           "from": {
  453.             "key_code": "end",
  454.             "modifiers": {
  455.               "optional": [
  456.                 "any"
  457.               ]
  458.             }
  459.           },
  460.           "to": [
  461.             {
  462.               "key_code": "e",
  463.               "modifiers": [
  464.                 "left_control"
  465.               ]
  466.             }
  467.           ]
  468.         }
  469.       ]
  470.     },
  471.     {
  472.       "description": "Home key to the beginning of the sentence (Command + Left). Doesnt work in terminal",
  473.       "manipulators": [
  474.         {
  475.           "type": "basic",
  476.           "from": {
  477.             "key_code": "home",
  478.             "modifiers": {
  479.               "optional": [
  480.                 "any"
  481.               ]
  482.             }
  483.           },
  484.           "to": [
  485.             {
  486.               "key_code": "left_arrow",
  487.               "modifiers": [
  488.                 "left_alt"
  489.               ]
  490.             }
  491.           ]
  492.         }
  493.       ]
  494.     },
  495.     {
  496.       "description": "End key to the end of the sentence (Command + Right). Doesnt work in terminal",
  497.       "manipulators": [
  498.         {
  499.           "type": "basic",
  500.           "from": {
  501.             "key_code": "end",
  502.             "modifiers": {
  503.               "optional": [
  504.                 "any"
  505.               ]
  506.             }
  507.           },
  508.           "to": [
  509.             {
  510.               "key_code": "right_arrow",
  511.               "modifiers": [
  512.                 "left_alt"
  513.               ]
  514.             }
  515.           ]
  516.         }
  517.       ]
  518.     },
  519.     {
  520.       "description": "Control+Shift+Esc Opens Activity Monitor",
  521.       "manipulators": [
  522.         {
  523.           "type": "basic",
  524.           "from": {
  525.             "key_code": "escape",
  526.             "modifiers": {
  527.               "mandatory": [
  528.                 "control",
  529.                 "shift"
  530.               ]
  531.             }
  532.           },
  533.           "to": [
  534.             {
  535.               "shell_command": "open -a 'Activity Monitor.app'"
  536.             }
  537.           ],
  538.           "conditions": [
  539.             {
  540.               "type": "frontmost_application_unless",
  541.               "bundle_identifiers": [
  542.                 "^com.microsoft.rdc$",
  543.                 "^com.microsoft.rdc.mac$",
  544.                 "^com.microsoft.rdc.macos$",
  545.                 "^com.microsoft.rdc.osx.beta$",
  546.                 "^net.sf.cord$",
  547.                 "^com.thinomenon.RemoteDesktopConnection$",
  548.                 "^com.itap-mobile.qmote$",
  549.                 "^com.nulana.remotixmac$",
  550.                 "^com.p5sys.jump.mac.viewer$",
  551.                 "^com.p5sys.jump.mac.viewer.web$",
  552.                 "^com.teamviewer.TeamViewer$",
  553.                 "^com.vmware.horizon$",
  554.                 "^com.2X.Client.Mac$",
  555.                 "^com.vmware.fusion$",
  556.                 "^com.vmware.horizon$",
  557.                 "^com.vmware.view$",
  558.                 "^com.parallels.desktop$",
  559.                 "^com.parallels.vm$",
  560.                 "^com.parallels.desktop.console$",
  561.                 "^org.virtualbox.app.VirtualBoxVM$",
  562.                 "^com.vmware.proxyApp.",
  563.                 "^com.parallels.winapp."
  564.               ]
  565.             }
  566.           ]
  567.         }
  568.       ]
  569.     },
  570.     {
  571.       "description": "Print key to printscreen",
  572.       "manipulators": [
  573.         {
  574.           "type": "basic",
  575.           "from": {
  576.             "key_code": "print_screen",
  577.             "modifiers": {
  578.               "optional": [
  579.                 "any"
  580.               ]
  581.             }
  582.           },
  583.           "to": [
  584.             {
  585.               "key_code": "5",
  586.               "modifiers": [
  587.                 "left_alt",
  588.                 "left_shift"
  589.               ]
  590.             }
  591.           ]
  592.         }
  593.       ]
  594.     },
  595.     {
  596.       "description": "Open App Exposé with mouse 1/2 buttons",
  597.       "manipulators": [
  598.         {
  599.           "type": "basic",
  600.           "from": {
  601.             "simultaneous": [
  602.               {
  603.                 "pointing_button": "button1"
  604.               },
  605.               {
  606.                 "pointing_button": "button2"
  607.               }
  608.             ],
  609.             "modifiers": {
  610.               "optional": [
  611.                 "any"
  612.               ]
  613.             }
  614.           },
  615.           "to": [
  616.             {
  617.               "key_code": "down_arrow",
  618.               "modifiers": [
  619.                 "left_control"
  620.               ]
  621.             }
  622.           ]
  623.         }
  624.       ]
  625.     },
  626.     {
  627.       "description": "Open Launchpad with mouse 3 button",
  628.       "manipulators": [
  629.         {
  630.           "type": "basic",
  631.           "from": {
  632.             "pointing_button": "button3",
  633.             "modifiers": {
  634.               "optional": [
  635.                 "any"
  636.               ]
  637.             }
  638.           },
  639.           "to": [
  640.             {
  641.               "key_code": "launchpad"
  642.             }
  643.           ],
  644.           "conditions": [
  645.             {
  646.               "type": "frontmost_application_unless",
  647.               "bundle_identifiers": [
  648.                 "^com.googlecode.iterm2",
  649.                 "^com.apple.Terminal",
  650.                 "com.lemonmojo.RoyalTSX.App"
  651.               ]
  652.             }
  653.           ]
  654.         }
  655.       ]
  656.     },
  657.     {
  658.       "description": "Open Mission Control with mouse 4/5 buttons",
  659.       "manipulators": [
  660.         {
  661.           "type": "basic",
  662.           "parameters": {
  663.             "basic.simultaneous_threshold_milliseconds": 1000
  664.           },
  665.           "from": {
  666.             "simultaneous": [
  667.               {
  668.                 "pointing_button": "button4"
  669.               },
  670.               {
  671.                 "pointing_button": "button5"
  672.               }
  673.             ],
  674.             "modifiers": {
  675.               "optional": [
  676.                 "any"
  677.               ]
  678.             }
  679.           },
  680.           "to": [
  681.             {
  682.               "key_code": "mission_control"
  683.             }
  684.           ]
  685.         }
  686.       ]
  687.     },
  688.     {
  689.       "description": "Move to left space with mouse 4 button",
  690.       "manipulators": [
  691.         {
  692.           "type": "basic",
  693.           "parameters": {
  694.             "basic.simultaneous_threshold_milliseconds": 1000
  695.           },
  696.           "from": {
  697.             "pointing_button": "button4",
  698.             "modifiers": {
  699.               "optional": [
  700.                 "any"
  701.               ]
  702.             }
  703.           },
  704.           "to": [
  705.             {
  706.               "key_code": "left_arrow",
  707.               "modifiers": [
  708.                 "left_control"
  709.               ]
  710.             }
  711.           ]
  712.         }
  713.       ]
  714.     },
  715.     {
  716.       "description": "Move to right space with mouse 5 button",
  717.       "manipulators": [
  718.         {
  719.           "type": "basic",
  720.           "from": {
  721.             "pointing_button": "button5",
  722.             "modifiers": {
  723.               "optional": [
  724.                 "any"
  725.               ]
  726.             }
  727.           },
  728.           "to": [
  729.             {
  730.               "key_code": "right_arrow",
  731.               "modifiers": [
  732.                 "left_control"
  733.               ]
  734.             }
  735.           ]
  736.         }
  737.       ]
  738.     }
  739.   ]
  740. }
  741.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement