Swing can be a frustrating beast. Especially if you are trying to design an application with it that goes "against the grain" of the assumptions that the Swing designers used in designing Swing. We have requirements that assign functionality to keystrokes that are way out of the normal. Yesterday, the issue was that JComboBox
and JScrollPane
considered keys like PageUp and PageDown "navigation keys" and grabbed these in spite of our attempts to remap them to other uses when such components had focus. You might say, that's poor design, but those are our requirements. There are even special keyboard that have labels indicating these functional remappings and we have to meet those. Such is life.
Today, another issue has popped up that a JTextPane
seems to be grabbing the F6 key when it has focus. When other components have focus, not a problem. WTF?
And so, my question is simply this: Is there any documentation on what keystrokes each type of Swing component is grabbing and placing outside the normal InputMap/ActionMap
system that application level programmers are urged to follow? I know this depends further on the LookAndFeel
, and that what happens in Motif
may be different than what happens in Metal
, etc. Still, even drilling down to this level, is this stuff documented anywhere? I would like to know this so I might know at the start where my problems are going to lie instead of learning this one at a time. If I know where the problems are I know how to work around them. But I have source code, java docs, and I just don't know where to look.
Is there any documentation on what keystrokes each type of Swing component is grabbing and placing outside the normal InputMap/ActionMap system that application level programmers are urged to follow?
No documentation that I'm aware of.
Maybe Key Bindings list will help you out.