Hi,
I'd like to add help to my application, and have the help system invoked
when the user pressed the F1 key on windows.
My question is, where do I attach the key listener?
I want the listener to be able to capture the key event regardless of which
component has focus.
Thanks,
Jack
Alan Moore - 29 Jan 2004 01:36 GMT
>Hi,
>
[quoted text clipped - 9 lines]
>
>Jack
The easiest way is just to tap into the EventQueue, as described in
this article:
http://www.javaspecialists.co.za/archive/Issue007.html
Adam - 30 Jan 2004 15:28 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> I want the listener to be able to capture the key event regardless of which
> component has focus.
KeyboardFocusManager.addKeyEventDispatcher | PostProcessor
Adam
Jack - 03 Feb 2004 03:13 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> Jack
Alan's suggestion worked based on the article... works perfectly. I guess I
could've invoked the same via a menu item neumonic?. Oh well... now I know
how to do the hot-key thing.
Adam, I will check out your suggestion as well.
In any case, this is sweet... it's working quite well so I thank you for
your pointers... otherwise this could have been fairly painful.
Thanks again,
Jack