Controlling Which Macros Are Fired When Tapping Once, Twice, Thrice, or Four Times

hello @tiffle ,

have found the Rules JSON Code - in my case it is yet a File with digits in it's name

the Path to the corresponding Rule:

~/.config/karabiner/assets/complex_modifications/1595689590.json

I think I should give them real names or build a search Macro some days to find that file :joy::joy::joy::joy:

Here are the first 35 lines of this JSON Code


{
  "title": "Change 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"
            }
          ]
        }
      ]
    },

That is the Option of the CapsLock Rule I changed it to on my MacBook Pro
What I can read here is that I can use any Key with it to get all 4 Modifiers and if I press and hold it alone for at least 0.1 seconds I'll get the regular CapsLock behaviour. - maybe will change the "hold" to something like press 3 times

but that is not the thing .... This Rule will maybe work as expected if I only use the CapsLock Key with any other Key

so to follow my Idea from Post #16 which was this:

My Idea looks like this 

Hyper-Key
     Tapped 1x ---> EveryDay Favorite 1 
     Tapped 2x ---> EveryDay Favorite 2
     Tapped 3x ---> EveryDay Favorite 3

Normal use 
     Tapped 1x ---> Once a Week 1 
     Tapped 2x ---> Once a Week 2
     Tapped 3x ---> Once a Week 3

seems only possible to me with two Binding Setups and an option to change between them like

press CapsLock twice while holding right Shift Key  (It should not be easy to switch)

* runs Macro with Global Variable and is checking for SetupName 

   * If SetupName = Setup 1 ---> activate Macros for Setup 1, deactivates Macros for 
      Setup 2, change Variable 
    
   * If SetupName = Setup 2 ---> activate Macros for Setup 2, deactivates Macros for 
      Setup 1, change Variable
     

but seems that is not the only thing - sure - I have to add this rule in both Setups

In the second Setup there should not be the Hyper-Key but at least the Press 3 times to envoke the CapsLock behaviour.
This will make it possible to have a "normal 4Modifier HotKey " and a "Hyper-Key one"

how can I set up the JSON for CapsLock with Holding any Key? is this even Possible ? - It would be great .. this will make it possible to use @JMichaelTX 's Hold A Key Template Macro the same way....

Greetings from Germany

~ Tobias