ShortcutAction must click on window

I have a test app that contains a window w1 + panel p1 filled with another and a panel with some menu options pOptions. These options are associated with other panels which, when clicked, replace the content in p1.
I’ve added an ActionHandler to the main window which causes CTRL+SHIFT+HOME to replace the selected components in p1 with pOptions.

  1. The shortcut actions seem to only works only when part of a handler added to a window. Shouldn’t these work in any Action.Container?

  2. After p1 content is modified/reloaded. The ShortcutAction key strokes have no effect until I click somewhere on the window, after which, the ShortcutAction behaves as expected.

Initial state:

[b]
p1
A
B
C

[/b]

User mouse clicks
A
and the view switches to

[b]
p1
Content of Panel A

[/b]

(Focus is maintained in the window)
User keystrokes CTRL+SHIFT+HOME and nothings happens :[
User mouseclicks anywhere in the window, and then user User keystrokes CTRL+SHIFT+HOME, the view switches to

[b]
p1
A
B
C

[/b]

Does anyone know why, or have a suggestion to make the ShortcutAction work with out the in window mouse click?

I’m facing the same problem, was looking at the forum for a solution.

As soon as I find one, I’ll post here.

I’m guessing that the focus is lost from the window when you change some of it’s content (browser behaviour), and hence keyboard events are not directed to the window anymore.

You could try calling w1.focus() right after you switch to the selected panel.

I guess window doesn’t has focus, does it?