Skip to content

Instantly share code, notes, and snippets.

@val314159
Last active August 22, 2020 13:21
Show Gist options
  • Save val314159/97f51b24569cc559023195512efc5e83 to your computer and use it in GitHub Desktop.
Save val314159/97f51b24569cc559023195512efc5e83 to your computer and use it in GitHub Desktop.

Revisions

  1. val314159 revised this gist Aug 22, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion grail.js
    Original file line number Diff line number Diff line change
    @@ -159,6 +159,7 @@
    "mandatory": [
    ],
    "optional": [
    "caps_lock"
    ]
    }
    },
    @@ -195,7 +196,7 @@
    {
    "type": "basic",
    "from": {
    "key_code": "right_command",
    "key_code": "left_command",
    "modifiers": {
    "mandatory": [
    "caps_lock"
  2. val314159 revised this gist Aug 22, 2020. 1 changed file with 3 additions and 7 deletions.
    10 changes: 3 additions & 7 deletions grail.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    {
    "description": "augment tab",
    "description": "augment tab",
    "manipulators": [
    {
    "from": {
    @@ -159,7 +159,6 @@
    "mandatory": [
    ],
    "optional": [
    "right_command"
    ]
    }
    },
    @@ -188,7 +187,7 @@
    }
    ],
    "parameters": {
    "basic.to_delayed_action_delay_milliseconds": 2000
    "basic.to_delayed_action_delay_milliseconds": 500
    }
    },

    @@ -212,10 +211,7 @@
    "modifiers": [
    ]
    }
    ],
    "parameters": {
    "basic.to_delayed_action_delay_milliseconds": 2000
    }
    ]
    },


  3. val314159 revised this gist Aug 22, 2020. 1 changed file with 160 additions and 5 deletions.
    165 changes: 160 additions & 5 deletions grail.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,135 @@
    {
    "description": "augment tab",
    "description": "augment tab",
    "manipulators": [
    {
    "from": {
    "key_code": "4",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "hold_down_milliseconds": 0,
    "key_code": "caps_lock"
    },
    {
    "key_code": "vk_none"
    }
    ],
    "type": "basic"
    },
    {
    "type": "basic",
    "from": {
    "key_code": "i",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow",
    "modifiers": [
    "caps_lock"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "j",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow",
    "modifiers": [
    "caps_lock"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "k",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow",
    "modifiers": [
    "caps_lock"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "escape",
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow",
    "modifiers": [
    "caps_lock"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock",
    "modifiers": [
    ]
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "left_control",
    "modifiers": {
    "mandatory": [
    ],
    @@ -24,15 +149,17 @@
    }
    ]
    },
    {


    {
    "type": "basic",
    "from": {
    "key_code": "right_command",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "caps_lock", "right_command"
    "right_command"
    ]
    }
    },
    @@ -64,7 +191,35 @@
    "basic.to_delayed_action_delay_milliseconds": 2000
    }
    },
    {


    {
    "type": "basic",
    "from": {
    "key_code": "right_command",
    "modifiers": {
    "mandatory": [
    "caps_lock"
    ],
    "optional": [
    "right_command"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_command",
    "modifiers": [
    ]
    }
    ],
    "parameters": {
    "basic.to_delayed_action_delay_milliseconds": 2000
    }
    },


    {
    "type": "basic",
    "from": {
    "key_code": "right_shift",
  4. val314159 revised this gist Aug 22, 2020. 3 changed files with 159 additions and 3 deletions.
    4 changes: 2 additions & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    qall: clean tmp2.out
    cp tmp2.out ../tmp2.out
    tmp2.out: *.json
    python -um%filter %prelude.json *.js | tee $@
    tmp2.out:
    python -um%filter %prelude.json grail.js | tee $@

    call: clean all
    all: tmp.out
    42 changes: 41 additions & 1 deletion grail.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "key_code": "escape",
    "modifiers": {
    "mandatory": [
    ],
    @@ -26,6 +26,46 @@
    },
    {
    "type": "basic",
    "from": {
    "key_code": "right_command",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "caps_lock", "right_command"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_command",
    "modifiers": [
    "caps_lock"
    ]
    }
    ],
    "to_if_alone": [
    {
    "halt": true,
    "key_code": "right_command",
    "modifiers": [
    ]
    }
    ],
    "to_after_key_up": [
    {
    "key_code": "right_command",
    "modifiers": [
    "caps_lock"
    ]
    }
    ],
    "parameters": {
    "basic.to_delayed_action_delay_milliseconds": 2000
    }
    },
    {
    "type": "basic",
    "from": {
    "key_code": "right_shift",
    "modifiers": {
    116 changes: 116 additions & 0 deletions ograil.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,116 @@
    {
    "description": "augment tab",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "escape",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to_if_alone": [
    {
    "key_code": "tab"
    }
    ],
    "to": [
    {
    "key_code": "left_control"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "right_command",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "caps_lock", "right_command"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_command",
    "modifiers": [
    "caps_lock"
    ]
    }
    ],
    "to_delayed_action": {
    "to_if_invoked": [
    ],
    "to_if_canceled": [
    {
    "halt": true,
    "key_code": "right_command",
    "modifiers": [
    "caps_lock"
    ]
    }
    ]
    },
    "parameters": {
    "basic.to_delayed_action_delay_milliseconds": 250
    },
    "to_after_key_up": [
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "right_shift",
    "modifiers": {
    "mandatory": [
    "left_option"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "repeat": false,
    "key_code": "escape",
    "modifiers": [
    ]
    },
    {
    "key_code": "right_shift"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "left_option",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to_if_alone": [
    {
    "key_code": "escape",
    "modifiers": [
    ]
    }
    ],
    "to": [
    {
    "key_code": "left_option"
    }
    ]
    }
    ]
    }
  5. val314159 revised this gist Aug 22, 2020. 2 changed files with 77 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,3 @@

    z:
    python3 -umpyaml < x.yaml

    qall: clean tmp2.out
    cp tmp2.out ../tmp2.out
    tmp2.out: *.json
    77 changes: 77 additions & 0 deletions grail.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,77 @@
    {
    "description": "augment tab",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to_if_alone": [
    {
    "key_code": "tab"
    }
    ],
    "to": [
    {
    "key_code": "left_control"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "right_shift",
    "modifiers": {
    "mandatory": [
    "left_option"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "repeat": false,
    "key_code": "escape",
    "modifiers": [
    ]
    },
    {
    "key_code": "right_shift"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "left_option",
    "modifiers": {
    "mandatory": [
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to_if_alone": [
    {
    "key_code": "escape",
    "modifiers": [
    ]
    }
    ],
    "to": [
    {
    "key_code": "left_option"
    }
    ]
    }
    ]
    }
  6. val314159 revised this gist Aug 22, 2020. 6 changed files with 0 additions and 930 deletions.
    220 changes: 0 additions & 220 deletions q/aleftshift1.js
    Original file line number Diff line number Diff line change
    @@ -1,220 +0,0 @@
    {
    "description": "left shift, misc",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_command"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "open_bracket",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_command"
    ],
    "optional": [

    ]
    }
    },
    "to": [
    {
    "key_code": "close_bracket",
    "modifiers": [
    "right_shift"
    ]
    }
    ]

    },


    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "open_bracket"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "close_bracket"
    }
    ]
    },


    {
    "type": "basic",
    "from": {
    "key_code": "x",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "c",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "equal_sign"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "v",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "equal_sign",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "b",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "quote"
    }
    ]
    },


    {
    "type": "basic",
    "from": {
    "key_code": "slash",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "period"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "backslash",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "comma"
    }
    ]
    }





    ]
    }
    26 changes: 0 additions & 26 deletions q/capslock1.js
    Original file line number Diff line number Diff line change
    @@ -1,26 +0,0 @@
    {
    "description": "caps_lock := left control / escape",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    173 changes: 0 additions & 173 deletions q/crsr1.js
    Original file line number Diff line number Diff line change
    @@ -1,173 +0,0 @@
    {
    "description": "crsr1",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "p",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "l",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "semicolon",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "quote",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow"
    }
    ]
    }
    ]
    }
    415 changes: 0 additions & 415 deletions q/numbers.js
    Original file line number Diff line number Diff line change
    @@ -1,415 +0,0 @@
    {
    "description": "numbers",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "q",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "a",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "s",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "e",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "d",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "r",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "f",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "t",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "g",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "y",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "h",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "u",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "j",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "i",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "k",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "9",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "9"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "0",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "0"
    }
    ]
    }
    ]
    }
    51 changes: 0 additions & 51 deletions q/spacebar1.js
    Original file line number Diff line number Diff line change
    @@ -1,51 +0,0 @@
    {
    "description": "spacebar",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "spacebar",
    "modifiers": [
    "left_control"
    ]
    }
    ]
    }
    ]
    }
    45 changes: 0 additions & 45 deletions q/tab1.js
    Original file line number Diff line number Diff line change
    @@ -1,45 +0,0 @@
    {
    "description": "augment tab",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_shift"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde"
    }
    ]
    }
    ]
    }
  7. val314159 revised this gist Aug 22, 2020. 18 changed files with 2001 additions and 338 deletions.
    11 changes: 10 additions & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,18 @@

    z:
    python3 -umpyaml < x.yaml

    qall: clean tmp2.out
    cp tmp2.out ../tmp2.out
    tmp2.out: *.json
    python -um%filter %prelude.json *.js | tee $@

    call: clean all
    all: tmp.out
    cp tmp.out ..
    tmp.out: *.json
    python -um%filter *.json | tee $@
    clean:
    rm -fr tmp.out *~ *.pyc __pycache__
    rm -fr *.out *~ *.pyc __pycache__


    240 changes: 240 additions & 0 deletions aleftshift1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,240 @@
    {
    "description": "left shift, misc",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "m",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "right_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "slash",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "m",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "slash"
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "n",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "right_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "backslash",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "n",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "backslash"
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "z",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },


    {
    "type": "basic",
    "from": {
    "key_code": "x",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "c",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "equal_sign"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "v",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "equal_sign",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "b",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "quote"
    }
    ]
    },


    {
    "type": "basic",
    "from": {
    "key_code": "slash",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "period"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "backslash",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "comma"
    }
    ]
    }





    ]
    }
    26 changes: 26 additions & 0 deletions capslock1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    "description": "caps_lock := left control / escape",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "tab"
    }
    ]
    }
    ]
    }
    26 changes: 26 additions & 0 deletions capslock1.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    "description": "Change left control (capslock->ctl/tab)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    173 changes: 173 additions & 0 deletions crsr1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,173 @@
    {
    "description": "crsr1",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "p",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "l",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "semicolon",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "quote",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow"
    }
    ]
    }
    ]
    }
    244 changes: 0 additions & 244 deletions k.j
    Original file line number Diff line number Diff line change
    @@ -1,244 +0,0 @@
    {
    "title": "xChange caps_lock key (rev 4)",
    "rules": [
    {
    "description": "Change caps_lock key to command+control+option+shift if pressed with other keys",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "hold_down_milliseconds": 100,
    "key_code": "caps_lock"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "key_code": "f19"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "mandatory": [
    "shift"
    ],
    "optional": [
    "caps_lock"
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock to control if pressed with other keys. (rev 2)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "caps_lock",
    "hold_down_milliseconds": 500
    }
    ]
    }
    ]
    },
    {
    "description": "Disable caps_lock delay (rev 1)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock",
    "hold_down_milliseconds": 200
    },
    {
    "key_code": "vk_none"
    }
    ]
    }
    ]
    },
    {
    "description": "Map Left Option + Spacebar to Enter",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "modifiers": {
    "mandatory": [
    "left_alt"
    ]
    },
    "key_code": "spacebar"
    },
    "to": [
    {
    "repeat": true,
    "key_code": "return_or_enter"
    }
    ]
    }
    ]
    }
    ]
    }
    26 changes: 26 additions & 0 deletions left_option.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    "description": "left option",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "left_option",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_option"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    47 changes: 47 additions & 0 deletions number_row1.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    {
    "description": "left shift (mostly number row)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "q",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "r"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "q",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "g",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    }
    ]
    }
    498 changes: 498 additions & 0 deletions numbers.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,498 @@
    {
    "description": "numbers",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "open_bracket"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "close_bracket"
    }
    ]

    },


    {
    "type": "basic",
    "from": {
    "key_code": "u",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "right_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "open_bracket",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "i",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "right_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "close_bracket",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },




    {
    "type": "basic",
    "from": {
    "key_code": "q",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "a",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "s",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "e",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "d",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "r",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "f",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "t",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "g",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "y",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "h",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "u",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "j",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "i",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "k",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "open_bracket"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "9"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "close_bracket"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "0"
    }
    ]
    }
    ]
    }
    186 changes: 93 additions & 93 deletions tmp.out → q/aleftshift1.js
    Original file line number Diff line number Diff line change
    @@ -1,92 +1,82 @@
    {
    "title": "my stuff",
    "rules": [
    {
    "description": "Change left control (capslock->ctl/tab)",
    "description": "left shift, misc",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "left_control",

    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    "to": [
    {
    "key_code": "escape"
    "key_code": "open_bracket",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Change command-x to meta-x",
    "manipulators": [
    {
    },
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_command"
    ],
    "optional": [
    "any"

    ]
    }
    },
    "to": [
    {
    "key_code": "x",
    "key_code": "close_bracket",
    "modifiers": [
    "right_command"
    "right_shift"
    ]
    }
    ]
    },

    },


    {
    "type": "basic",
    "from": {
    "key_code": "x",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_command"
    "left_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    "to": [
    {
    "key_code": "x",
    "modifiers": [
    "left_option"
    ]
    "key_code": "open_bracket"
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Cursor keys LtCtl+pl;'",
    "manipulators": [
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift",
    "left_control"
    ],
    "optional": [
    @@ -96,17 +86,19 @@
    },
    "to": [
    {
    "key_code": "left_arrow"
    "key_code": "close_bracket"
    }
    ]
    },
    {


    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "from": {
    "key_code": "x",
    "modifiers": {
    "mandatory": [
    "left_control"
    "left_shift"
    ],
    "optional": [
    "any"
    @@ -115,17 +107,17 @@
    },
    "to": [
    {
    "key_code": "right_arrow"
    "key_code": "hyphen"
    }
    ]
    },
    {
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "from": {
    "key_code": "c",
    "modifiers": {
    "mandatory": [
    "left_control"
    "left_shift"
    ],
    "optional": [
    "any"
    @@ -134,17 +126,17 @@
    },
    "to": [
    {
    "key_code": "up_arrow"
    "key_code": "equal_sign"
    }
    ]
    },
    {
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "from": {
    "key_code": "v",
    "modifiers": {
    "mandatory": [
    "left_control"
    "left_shift"
    ],
    "optional": [
    "any"
    @@ -153,50 +145,60 @@
    },
    "to": [
    {
    "key_code": "down_arrow"
    "key_code": "equal_sign",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Change pgup/pgdn (tab->meta/esc)",
    "manipulators": [
    },
    {
    "type": "basic",
    "from": {
    "key_code": "comma",
    "from": {
    "key_code": "b",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "escape"
    },
    "to": [
    {
    "key_code": "comma",
    "modifiers": [
    "right_shift"
    "key_code": "quote"
    }
    ]
    },


    {
    "type": "basic",
    "from": {
    "key_code": "slash",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "period"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "period",
    "from": {
    "key_code": "backslash",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    "left_shift"
    ],
    "optional": [
    "any"
    @@ -205,16 +207,14 @@
    },
    "to": [
    {
    "key_code": "escape"
    },
    {
    "key_code": "period",
    "modifiers": [
    "right_shift"
    ]
    "key_code": "comma"
    }
    ]
    }





    ]
    }
    ]}
    26 changes: 26 additions & 0 deletions q/capslock1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    "description": "caps_lock := left control / escape",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    173 changes: 173 additions & 0 deletions q/crsr1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,173 @@
    {
    "description": "crsr1",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "p",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "l",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "semicolon",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command",
    "right_option"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "quote",
    "modifiers": [
    "left_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow"
    }
    ]
    }
    ]
    }
    415 changes: 415 additions & 0 deletions q/numbers.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,415 @@
    {
    "description": "numbers",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "q",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "a",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "1"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "s",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "2"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "e",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "d",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "3"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "r",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "f",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "4"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "t",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "g",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "5"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "y",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "h",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "6"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "u",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "j",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "7"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "i",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "k",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "8"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "o",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "9",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "9"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "0",
    "modifiers": [
    "left_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "0"
    }
    ]
    }
    ]
    }
    51 changes: 51 additions & 0 deletions q/spacebar1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    {
    "description": "spacebar",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "spacebar",
    "modifiers": [
    "left_control"
    ]
    }
    ]
    }
    ]
    }
    45 changes: 45 additions & 0 deletions q/tab1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    {
    "description": "augment tab",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_shift"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde"
    }
    ]
    }
    ]
    }
    56 changes: 56 additions & 0 deletions shorten.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    {
    "description": "shorten",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "return_or_enter"
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "slash",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_shift"
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "backslash",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "delete_or_backspace"
    }
    ]
    }
    ]
    }
    51 changes: 51 additions & 0 deletions spacebar1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    {
    "description": "spacebar",
    "manipulators": [

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "hyphen",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },

    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": [
    "left_shift"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "spacebar",
    "modifiers": [
    "left_control"
    ]
    }
    ]
    }
    ]
    }
    45 changes: 45 additions & 0 deletions tab1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    {
    "description": "augment tab",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_shift"
    ],
    "optional": [
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "tab",
    "modifiers": {
    "mandatory": [
    "right_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "grave_accent_and_tilde"
    }
    ]
    }
    ]
    }
  8. val314159 revised this gist Aug 21, 2020. 9 changed files with 459 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions %filter.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/env python3
    import os, sys
    from sys import argv
    from os import system
    prog = argv.pop(0)
    frst = argv.pop(0)
    last = argv.pop()
    system('cat '+frst)
    for fn in argv:
    system('cat '+fn)
    system('echo ","')
    pass
    system('cat '+last)
    system('echo "]}"')
    3 changes: 3 additions & 0 deletions %prelude.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    {
    "title": "my stuff",
    "rules": [
    9 changes: 9 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    call: clean all
    all: tmp.out
    cp tmp.out ..
    tmp.out: *.json
    python -um%filter *.json | tee $@
    clean:
    rm -fr tmp.out *~ *.pyc __pycache__


    26 changes: 26 additions & 0 deletions capslock.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    "description": "Change left control (capslock->ctl/tab)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "left_control",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    49 changes: 49 additions & 0 deletions commandx.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    {
    "description": "Change command-x to meta-x",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "modifiers": {
    "mandatory": [
    "left_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "x",
    "modifiers": [
    "right_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "x",
    "modifiers": {
    "mandatory": [
    "left_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "x",
    "modifiers": [
    "left_option"
    ]
    }
    ]
    }
    ]
    }
    81 changes: 81 additions & 0 deletions cursor.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,81 @@
    {
    "description": "Cursor keys LtCtl+pl;'",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow"
    }
    ]
    }
    ]
    }
    57 changes: 57 additions & 0 deletions home_end.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    {
    "description": "Change pgup/pgdn (tab->meta/esc)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "comma",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "escape"
    },
    {
    "key_code": "comma",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "period",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "escape"
    },
    {
    "key_code": "period",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    }
    ]
    }
    File renamed without changes.
    220 changes: 220 additions & 0 deletions tmp.out
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,220 @@
    {
    "title": "my stuff",
    "rules": [
    {
    "description": "Change left control (capslock->ctl/tab)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "left_control",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Change command-x to meta-x",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "w",
    "modifiers": {
    "mandatory": [
    "left_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "x",
    "modifiers": [
    "right_command"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "x",
    "modifiers": {
    "mandatory": [
    "left_command"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "x",
    "modifiers": [
    "left_option"
    ]
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Cursor keys LtCtl+pl;'",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "l",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "quote",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "right_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "p",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "up_arrow"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "semicolon",
    "modifiers": {
    "mandatory": [
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "down_arrow"
    }
    ]
    }
    ]
    }
    ,
    {
    "description": "Change pgup/pgdn (tab->meta/esc)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "comma",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "escape"
    },
    {
    "key_code": "comma",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "period",
    "modifiers": {
    "mandatory": [
    "right_shift",
    "left_control"
    ],
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "escape"
    },
    {
    "key_code": "period",
    "modifiers": [
    "right_shift"
    ]
    }
    ]
    }
    ]
    }
    ]}
  9. val314159 revised this gist Aug 19, 2020. 1 changed file with 243 additions and 1 deletion.
    244 changes: 243 additions & 1 deletion keys.json
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,244 @@
    {
    }
    "title": "xChange caps_lock key (rev 4)",
    "rules": [
    {
    "description": "Change caps_lock key to command+control+option+shift if pressed with other keys",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "hold_down_milliseconds": 100,
    "key_code": "caps_lock"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ],
    "to_if_alone": [
    {
    "key_code": "f19"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "mandatory": [
    "shift"
    ],
    "optional": [
    "caps_lock"
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock"
    }
    ]
    },
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_shift",
    "modifiers": [
    "left_command",
    "left_control",
    "left_option"
    ]
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "escape"
    }
    ]
    }
    ]
    },
    {
    "description": "Change caps_lock to control if pressed with other keys. (rev 2)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "left_control"
    }
    ],
    "to_if_alone": [
    {
    "key_code": "caps_lock",
    "hold_down_milliseconds": 500
    }
    ]
    }
    ]
    },
    {
    "description": "Disable caps_lock delay (rev 1)",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "caps_lock",
    "modifiers": {
    "optional": [
    "any"
    ]
    }
    },
    "to": [
    {
    "key_code": "caps_lock",
    "hold_down_milliseconds": 200
    },
    {
    "key_code": "vk_none"
    }
    ]
    }
    ]
    },
    {
    "description": "Map Left Option + Spacebar to Enter",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "modifiers": {
    "mandatory": [
    "left_alt"
    ]
    },
    "key_code": "spacebar"
    },
    "to": [
    {
    "repeat": true,
    "key_code": "return_or_enter"
    }
    ]
    }
    ]
    }
    ]
    }
  10. val314159 created this gist Aug 19, 2020.
    2 changes: 2 additions & 0 deletions keys.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    {
    }