PDA

View Full Version : Window Key Listener



hraing
22 Aug 2011, 5:46 AM
So, what I need to do is to close the window and go to a specific page.

I´ve disabled the ESC funtion wich only cloes the window

window.setOnEsc(false); so the window doesn´t do anyting now.

now I want to add an handler which works for the window and all its children that caches the ESC on keypress becuase I want to direct the user to a specific page..

Any Ideas??


regards
Hrafn

micgala
23 Aug 2011, 12:52 AM
Try doing the exact same way that the onEsc configuration is doing.

Override the onKeyPress on your Window... and then, if esc was pressed, do something else other then calling hide(), which is the default.

Hope this helps you.

Regards,
Michel.