I've only recently realized that an event-driven function cannot contain any pause-like statements, which includes rate() statements. This is closely linked to the fact that JavaScript programs (to which VPython compiles) must be written in an "asynchronous" manner, such that functions must do their job quickly and then return control to the browser rather than containing long-running loops that lock up the browser. The GlowScript machinery uses the Streamline library to restructure programs that contain pauses (including rate) into an asynchronous form. For example, in a while loop containing a rate() statement, the contents of the loop are moved into a separate function that is called at a frequency determined by the rate argument. It turns out that this scheme isn't working for cases where a function containing pauses is called as an event-bound function.
While I would like to make it possible to put a pause in an event-bound function, and I will try, it is the case that the "asynchronous" nature of event-bound functions means that they are intended to perform some service and exit promptly, so that other processes can continue. It is conceivable that there isn't a way to make this work as one would like.
Bruce