I've got it!
Reading http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html told me, that there are three InputMaps:
- JComponent.WHEN_FOCUSED
- JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
- JComponent.WHEN_IN_FOCUSED_WINDOW
By calling getRootPane.getInputMap() I got the "default" WHEN_FOCUSED Inputmap, but by calling a Subdialog the rootPane seems to lost the focus and nothing helped to get the Focus back.
Now I am using getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(...) and it works.
I am a little bit amazed, that it has worked before until opening a Subdialog.