A quick google search [mouse click]:
http://www.google.com/search?hl=en&q=Mouse+Click+simulator&btnG=Search
[key press]:
http://www.google.com/search?hl=en&q=keypress+simulator&btnG=Search
I've used VBScript myself. Check it out..
An example, after a quick search: Copy this into Notepad and save it as "enter.vbs" WITH the qoutes in the name. Assign a keyboard shortcut to it. When you press the keys, it will hit the enter key 5 times.
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{enter}"
WScript.Sleep 10
WshShell.SendKeys "{enter}"
WScript.Sleep 10
WshShell.SendKeys "{enter}"
WScript.Sleep 10
WshShell.SendKeys "{enter}"
WScript.Sleep 10
WshShell.SendKeys "{enter}"
WScript.Sleep 10