So I had this customer who asked me to do an flv player for his site, he wanted the controls of the player to fade out when the user is idle, now flash does not have an onIdle event of any kind and the only way around this was to trigger a signal when the mouse kept its position (did not move) for more than 3 second (or x seconds, customizable) or keys has not been pressed for x seconds.
Again, flash does not have an onMouseStill event so I had to do it this way:
//fading out code goes here...
/fading in code goes here....
A similar approach can be applied to keypresses.
Hope this helps.