"Repeat
From" is only used in combination with other actions as part of a
macro, which are created in Expert Mode. So if you're in simple mode,
switch to expert mode with the button at the bottom left of the window.
Once
in Expert Mode, select the profile and input you want to add the
"Repeat From" action to. If the input does not already have a mapping,
click "+ Add mappings" to create a new empty mapping to work on.
Click
directly on the name of the output you want to add the repeat to.
Typically this will be the action assigned to the "Press" input. But you
can add repeats to the "Release" input as well if you ever need to.
If
the output list is currently empty, first use the "Select Output Type"
drop-down, or the "Record Keystrokes" button to add the action you want
repeated.
Next use the "Select Output Type" drop-down and select the "Repeat / Wait / Stop / Alternate" category.
This will add a "Wait" action by default, so open its drop-down and change it into a "Repeat From".
The "Repeat From" output should now be in the output list as shown below.
The "Repeat From" action has two settings you'll need to understand to use it correctly.
Output ID#:
This
field sets the target action for the repeat. This must be an action
above the repeat itself, so the list of available IDs will vary
depending on which position the repeat itself is in.
If there is only one action above the repeat, then the only option will be ID #1.
Typically
the Output ID# will be set to #1, but sometimes it's useful to exclude
some actions from the loop. In which case you will set a different value
for this.
Times:
The
'Times' field sets how many times the repeat action will cause the
macro to jump back to the selected Output ID. If left at its default '0'
value, it will repeat infinitely, or at least until the loop is
manually broken, or the profile is changed.
Example mapping
Example #1 - Repeating on output:
The following macro will result in the key sequence "AAA".
- The
'A' Tap is activated 3 times, not 2 as you might expect. This is
because the 'A' Tap activates once before the repeat is triggered. The
repeat then activates it 2 more times, resulting in 3 total.
Example #2 - Repeating multiple outputs:
The following macro will result in the key sequence "ABCABC".
- A
repeat includes not only the target action, but also every action
between the target and the repeat itself. So the full ABC sequence is
repeated not just the A.
- The sequence activates once normally, then the repeat adds the second set.
Example #3 - Repeating some, but not all outputs:
The following will result in the key sequence "ABBBBC".
- The output ID is set to #2 this time, so the A key is not repeated.
- Only the 'B' key is included in the repeat, and the times value is 3. Which results in 4 'B' outputs.
- The 'C' key is after the repeat, so is not effected by it at all. It just activates once after the repeat has finished.
Example #4 - Infinite Loop:
The following will result in 'A' being repeated indefinitely.
- A
"Times" value of 0 represents infinity. So the looped outputs will
never stop. This is generally not desirable, so a mapping like this
should be paired with another that stops the loop. We'll cover that in
the next section.
How to stop an infinite Loop
When the "Times" field of a loop is set to '0' it will
only stop when a "Stop Looping" action is used (or if the active
profile is changed). There are a few different ways you can set this up depending on how you want the mapping to behave.
This
setup generally isn't recommended, as it uses two inputs when the other
methods only use one. But if you want to use it you can simply add the
"Stop Looping" action to a second button. It can be found in the same
"Repeat / Wait / Stop / Alternate" category as "Repeat From".
This
is the most commonly used setup. Simply create any loop with a times
value set to '0' on the "Press" input. Then add the "Stop Looping"
action to the separate "Release" Input.
The final mapping will look something like this
Push the button once to start the loop, then push it again to stop it.
This
setup requires use of the "Alternate" action, which allows a mapping to
cycle through 2 or more actions each time it is pressed. We use an
Alternate on the button release with a "Wait" action, and a "Stop
Looping" action.
On the first button press the loop begins, then when it's released Alternate selects the "Wait" action that has no effect, allowing the loop to continue.
However, the next time the button is pressed the Alternate will instead select the "Stop Looping" action, ending the loop.