This repository contains most of my user directory and some notes that I took early on in my caster journey which are mostly irrelevant nowadays.
Caster is an extension to the Dragonfly framework that allows you to control your computer with voice commands.
The following section has been mostly generated by Gemini 2.5 Pro with some minor adjustments:
foot_pedal.ahk provides advanced control for the Olympus RS31H USB foot pedal, which maps its four pedals to the F13, F14, F15, and F16 keyboard keys.
It is specifically designed to solve the common hardware issue where the pedal sends "bouncing" or repeated key events, making simple press-and-hold detection unreliable. This script implements a robust debouncing and polling method to provide clean tap, hold, and long-press actions.
- AutoHotkey v2.0 or newer.
- An Olympus RS31H foot pedal (or any other foot pedal that sends
F13-F16key presses).- In order to program keys beyond F12 on the RS31H, you need manually edit the XML configuration file.
- Enable ViaCam with the cursor control keyboard shortcut (default:
F11).
The script assigns the following "smart" actions to each pedal, with visual tooltips for feedback:
-
Right Pedal (
F15): Smart Left Click- Short Tap (First Time): Sends
F11. This is useful for a one-time setup action. Specifically, Enable ViaCam with the cursor control keyboard shortcut (default:F11). - Short Tap (Subsequent): Acts as a standard Left Mouse Click.
- Press and Hold: Initiates a Left Mouse Drag. Release the pedal to drop.
- Short Tap (First Time): Sends
-
Middle Pedal (
F14): Scroll Down- Short Tap: Scrolls down one increment (
WheelDown). - Press and Hold: Scrolls down continuously until released.
- Short Tap: Scrolls down one increment (
-
Top Pedal (
F16): Scroll Up- Short Tap: Scrolls up one increment (
WheelUp). - Press and Hold: Scrolls up continuously until released.
- Short Tap: Scrolls up one increment (
-
Left Pedal (
F13): Smart Right Click & Reset- Short Tap: Acts as a standard Right Mouse Click.
- Long Press: Resets the state of the Left Pedal (
F15) back to its "first tap sendsF11" behavior. It also sends anF11immediately upon reset.
All timing and behavior can be easily adjusted by editing the variables in the --- Config --- section at the top of the script file.
F15_HoldDelay: Time in milliseconds to hold the Right Pedal to begin a drag-and-drop.F13_HoldDelay: Time in milliseconds to long-press the Left Pedal to trigger the reset action.Scroll_HoldDelay: Time in milliseconds to hold a scroll pedal before continuous scrolling begins.Scroll_RepeatRate: Time in milliseconds between each scroll tick during a hold. A smaller value results in faster scrolling.
Note: Yes, I prefer to use my right foot for clicking and my left foot for right clicking and stopping cursor tracking