> Hm, I want to create a virtual keyboard. So I made a container with > the whole ABC. Each Button (A, B, C...) has a own listener. So if I > click on a button (A, B ...) Then I want to get the same action like > pressing a key on the keyboard. > > One Example is: I have a List. If I press the A button, I want to get > all listitems beginning with an A. > > I need this virtual keyboard, because I want my app to run on > touchscreens.
Ok, but why would you want to use keyboard events to implement that?! All your buttons could fire a custom event, say "virtualKeyboardPress". Then all widgets that need to process such events, like your list widget, or a text widget, or what have you, just need to listen to "virtualKeyboardPress" and they will receive the appropriate event. You can emulate stripped-down keyboard events objects, by supplying just the pressed character, maybe its char code, and the modifier keys (shift, alt, ...), so all listening widgets have the information they need to react on the events. No need to resort to synthetic keyboard events. It would be different if you would try to implement a generic virtual keyboard that automatically works with all widgets that react on key events, and without them knowing the difference. BTW: I'm sure you can use a common 'execute' listener for all your virtual keys that simply inspects which button it was that was being pressed, and then fires the custom event. T. ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
