Sorry to bomb this list with an off-topic post, however... Ages ago I wrote a mouse/keyboard watcher in Python+Tk: http://sf.net/projects/watch. It's been idle for a long while though, isn't terribly portable and doesn't work properly with tools like Synergy (http://sf.net/projects/synergy2). Someone, I thought from this list or maybe python-dev, told me about a newer open source application in the same space which is more portable and actively maintained/developed. Alas, I can't recall the name, nor can I find it on my computer. Ring any bells?
Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list