I use the tot object from the toxy external to do this. It works beautifully. It has to have the name of the target window as its first argument, and if you send it a "capture 1" message, it will output all mouse and keyboard activity from the target window, which you can filter and map to scalars.
in XP with pd-ext pd crashes everytime I try to load the help patch - but
not when I create a [tot] object. I've never used it before, can someone
send a working patch just to see if I can do something with it?