repeater
The repeater plugin provides mechanisms to quickly duplicate your last spoken command or phrase. This is accomplished using either spoken voice commands or physical mouth noises (specifically, popping your lips twice in rapid succession).
Together, these files streamline repetitive workflows—such as navigating multiple lines of code, deleting multiple characters, or duplicating actions—without requiring you to repeat the full voice commands.
Voice-Driven Repetition
The repeater.talon file defines intuitive voice commands for repeating previous actions:
- Ordinal-based repetition: Commands like "third" or "fourth" (parsed via
<user.ordinals>) repeat the previous actionn - 1times. For example, saying "third" repeats the command twice, meaning the action is executed three times in total. - Count-based repetition: Saying a number followed by "times" (e.g., "five times") executes the repeat
number_small - 1times. - Direct commands: Commands such as "repeat that" or "twice" immediately trigger a single repeat (
core.repeat_command(1)). - Explicit multiplication: "repeat that <number_small> times" repeats the command exactly that many times.
- Partial phrase repetition: The phrase "repeat phrase" or "again" uses Talon's
core.repeat_partial_phraseto re-evaluate the last spoken utterance.
Noise-Driven Repetition
The pop_twice_to_repeat.py file implements a highly efficient hands-free and voice-free shortcut using mouth noises.
When the user.pop_twice_to_repeat tag is active in command mode, making two quick consecutive "pop" sounds triggers core.repeat_command().
- Timing Constraints: The logic measures the time elapsed between two pops using Python's high-resolution
time.perf_counter(). A repeat is only triggered if the interval between pops falls within the configurable window defined byuser.double_pop_speed_minimumanduser.double_pop_speed_maximum. - Zoom Mouse Compatibility: To prevent accidental triggers, the action checks if the eye-tracker's zoom mouse functionality is currently active (
actions.tracking.control_zoom_enabled()). If zoom mouse is enabled, it takes priority, and the repeater logic is safely bypassed.