how about this


killall easystroke; xte 'sleep 5'; easystroke

you would need xautomation


sudo apt-get install xautomation