xdo - do (keyboard or mouse) things in X :: semicomplete.com - Jordan Sissel
"I spent some time coding today and I now have a tool that will let you execute raw keyboard and mouse input into X using the XTEST extension."