On Thu, Mar 3, 2011 at 2:49 AM, Chris Bartlett <[email protected]>wrote:
> It is also possible to add ComponentKeyListeners to a Display object. > > http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTooltipSkin.java > I'm afraid this has the same problem as adding a listener to the Window object -- it doesn't work unless some descendant has obtained focus. > Have a look at the StockTracker example which demonstrates using > ActionMappings to bind KeyStrokes to Actions for a Window. > http://pivot.apache.org/tutorials/stock-tracker.html > > http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/ > Amazingly enough, this too has the same problem! So, folks, I assert there's something wrong here. I should be able to put some kind of event listener on a top-level window to process keystrokes without depending on Pivot's own internal notion of "focus" -- top-level windows have focus defined by the OS! I shouldn't have to stand on my head creating a focusable subclass of WindowSkin. (Admittedly, Chris has shown that it's easy to do, but it seems wrong to make everyone do it.)
