Only thing i know of is to be monitoring the $editbox for the key being pressed.

This of course is limited to keys that produce a charactre in the editbox.