Hi guys, To clarify, I need to log keys pressed in QXTextArea excluding state-preserving ones (cursors, function keys, etc.). Initially I wanted to reject some keys based on their codes. That however seems impossible. I don't know how to use multiple events at a time as mentioned by Alex. I think I will be simply checking the text length from the XQTextArea and logging the 'keyCode' only if the length has changed. Let me know you think there is a better way.
Regarding good cross-browser solution: I did some testing with FF 1.5 and IE 6. Both browsers Event objects support 'keyCode' and 'charCode' properties (those two let you tell letters from functional keys). However, 'keypress' events fired by state-preserving keys are "digested" by IE (they don't make it to the document). You can still get the 'keyCode' and 'charCode' using 'keydown' or 'keyup' events, but then it's not possible to capture combinations of keys (e.g. SHIFT+S). At least not in an easy way. Thanks, --Tomek Sebastian Werner wrote: > That's a completely different issue I think. He just want to differ > between "F5" and "s". If someone found a good (working) cross-browser > solution to get more informations from the pressed key, I'm happy to > integrate this with qooxdoo. > > Cheers, > > Sebastian > > > > Alex D. schrieb: >> Hi, >> All i can say - you are not the first one :-) >> Use two EventListeners: "input" and "keypress". "input" will give you >> the value, and "keypress" the keycode. >> Cheers, >> alex.d >>> Dear all: >>> >>> I've had some problems with QXKeyEvent::getKeyCode(). It returns the >>> same value for some pairs of character keys and function keys (e.g. 's' >>> and 'f5'). Because of that I can't tell what was actually pressed. What >>> am I missing here? >>> >>> Best, >>> --Tomek >>> >>> >>> ------------------------------------------------------------------------- >>> Using Tomcat but need to do more? Need to support web services, security? >>> Get stuff done quickly with pre-integrated technology to make your job >>> easier >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>> _______________________________________________ >>> qooxdoo-devel mailing list >>> qooxdoo-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >>> >>> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel