I've recently started playing a MMO game again that requires a lot of keyboard button spamming.
When I played this game on windows I used the AutoHotKey utility to write a script to repeat the key while I had it held down. Are there any utilities out there that I could use that would allow me to repeatedly send keyup/keydown events while I hold down a key? Preferably one that allows me to configure it to only do this when a specific window is focused.
If nothing already exists like this, I was planning on writing a very small utility in C that would do this.
About 1 second worth of google serching: http://code.google.com/p/autokey/
I did see that, I was somewhat hoping I could go for a more light weight approach (Autokey has some hefty dependencies), but maybe my goal is a little too specific =P
Last edited by EvanPurkhiser (2013-10-05 06:30:44)
Try xdotool. I've used this for simulating activity in Castlevania for PSX.
#!/bin/bash winid=$(xdotool search "pSX v1.13" | head -n1) while true do xdotool keydown --window $winid "x" xdotool keyup --window $winid "x" done exit 0
xdotool would certainly work for sending keyup / keydown. But Is there a way I can make the script only do this when I'm holding down a key?
I suppose it may look something like this:
while true do # Do something to block while key isn't down xdotool keydown --window $winid "x" xdotool keyup --window $winid "x" done