Set a callback function to be called on keypress.
This applies to the current active WindowProxy.
Callback function to be called on keypress.