I am looking for a method that allows me to press and hold down a key, for example "X", and instead of pressing just once, I want it to be read as multiple presses in a very short period of time. So for example, 0.1s delay between the presses, and the pressing per say, continues until I release the key.
- Custom apps to do this are fine.
- Scripts and automation of any language are fine (I can install frameworks or languages if it gets me to my goal)
- Third party scripting apps are fine.
- Third party accessibility apps or hardware solutions are fine
I am trying to target the Firefox process for these repeated key press bursts.
Here's my research showing how close I can get with a script, and tried modifying it to apply to my situation, opened it via "Automator" but the functionality is wrong:
tell application "System Events" delay 0.1 keystroke space using command down delay 0.1 keystroke space using command down delay 0.1 keystroke space using command down delay 0.1 keystroke space using command down delay 0.1 keystroke space using command down end tell
Moreover, I wanted the script to work on a "X" key, but this particular script sends space bar requests. And even if this worked, it would just press 5 times (or as many times as I would copy and paste the 'keystroke' line), but I want to have it stopped when I release the key. (If this is not possible, I am okay with having certain amount of presses as well, somewhere around ~20 would be nice)