The XMacro package contains two programs (xmacrorec and xmacroplay) for recording and replaying keyboard and mouse events through the XTest extension on an X server.
Information regarding Project Releases and Project Resources. Note that the information here is a quote from Freecode.com page, and the downloads themselves may not be hosted on OSDN.