Community
Participate
Working Groups
When using RWT.ACTIVE_KEY, the keystroke listener is only executed if the keystroke is registered on the focused control. This is fine if the keystroke is only used for a specific control. In our case we would like to register a keystroke for a composite which may contain multiple controls. At the moment we have to register the same keystroke on every control. It works but I am unsure if it's the way to go. In my opinion it would be better if the javascript code checked the parent controls of the focused one as well. With this solution one could reduce the transmitted data a little. If you don't agree, feel free to close the ticket.
I like the idea, but I also see a potential for breaking existing code when changing this behavior. When someone currently sets ACTIVE_KEYS on a Composite, it would not have any effect unless the Composite is forced to be focused (I think that's possible). Also, what would happen if you have ACTIVE_KEYS set on both parent and child?
(In reply to comment #1) Good point. The idea behind supporting ACTIVE_KEYS on controls was to be able to limit the number of requests that are sent for key events to those keys that the listener code is actually interested in. I'd think that this is related to a type of widgets more than to the parent hierarchy. Could you explain your use case a little more?