I'm trying to create some scripts using xev and xdotool to allow me to record and re-play macros in linux. I've got the recording working with xev, and the replaying mostly works but appears to leave my X session in a weird state. I've got a macro file like this:
keydown e keyup e keydown c keydown h keyup c keydown o keyup h keyup o keydown space keyup space keydown apostrophe keyup apostrophe keydown h keydown i keyup h keyup i keydown apostrophe keyup apostrophe
and I'm trying to use it with
cat macro.txt | xargs xdotool. This types out my text in the terminal, but after it finishes, most of my keys don't work anymore; they either print out control characters, or they just don't do anything. I've had to restart my computer a couple times to get it re-set. Any idea how I can avoid this or what is going on? Or even what a good linux macro tool might be?