|
Thank you Alex! This was the hint I needed. I did the following assuming that "this" is the qx.ui.window.Window: this._okbutton = new qx.ui.form.Button('Login'); this._okbutton.set({right:10,bottom:10}); this.addEventListener("keydown", function(event) { if( event.getKeyCode()==13){ event.stopPropagation(); this._okbutton.dispatchEvent(event); } }); this.addEventListener("keyup", function(event) { if( event.getKeyCode()==13){ event.stopPropagation(); this._okbutton.dispatchEvent(event); } }); this.add(this._okbutton); So we have to catch the "keydown" and "keyup" event and filter the "enter" key. Then we stop the propagation of the event (to avoid recursive triggering of the event) and call the dispatchEvent method of the button with the current event object. This way we also have the visual response of the button showing that he has been activated. The same methodology can be done by catching the "escape" key to activate the "cancel" button. Alex D. schrieb: Hi Dietrich, i think you will have to attach eventlistener to the window(responding to enter or space) and then call your button-onpress routine.Cheers, alex.d -- Mit freundlichen Grüßen Dietrich Streifert Visionet GmbH |
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
