Is there a way to use a variable as a keystroke action? Or another way to loop over many key combos?

It is not clear what you are trying to achieve, but I'll try a stab-in-the-dark to see if this helps:

  1. Macros can have as many different triggers at the same time as you like
  2. So, create your macro and assign all of the triggers to it.
  3. The first Action will be to get the trigger that was used:
    set myTrigger to %TriggerValue%
  4. Next use a Switch or Case action with the Variable myTrigger
    • Each Case will be the different triggers, as in:
      • ⌃1
      • ⌃2
      • etc

This simple macro will help you understand Trigger Tokens.

Example Results

image


MACRO:   Example of Trigger Tokens


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/7/c/7c331a269bbe4c2177ac50128c1911add8be9e2d.kmmacros">Example of Trigger Tokens.kmmacros</a> (2.8 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|475x440](upload://l7E1d33k53xyJk2MIySiiDXx5s3.jpeg)

---

Questions?