pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: KeyListeners on ImageView
Date Thu, 03 Mar 2011 10:49:15 GMT

Have a look at the StockTracker example which demonstrates using
ActionMappings to bind KeyStrokes to Actions for a Window.

Other info...

It is also possible to add ComponentKeyListeners to a Display object.


On 3 March 2011 09:18, Bill van Melle <bill.van.melle@gmail.com> wrote:

> Wow, this thread arrived just in time for the related question that I just
> ran into.  As best I can tell, Window has the same problem -- it's a
> container, and hence not focusable.  That seems to mean that if I want to
> have any global keyboard shortcuts, I have to go implement a FocusableWindow
> and FocusableWindowSkin, right?  This seems wrong somehow, especially since
> top-level windows have a very well-known sense of focus bestowed by the
> window system.  Why should everyone have to roll their own?  Am I missing
> anything?
> (Well, looking at your example, I see that
> implementing Application.UnprocessedKeyHandler might do the trick for the
> top-level app, but what if I generate additional top-level windows and want
> them to have shortcuts, such as Esc to close them?)

View raw message