posted 13 years ago
If that's the actual code for the action, then how can you even tell if it's being called? The GUI does nothing, but isn't that exactly what the action says it will do?
But yes, there is a flaw. InputMap doesn't do anything by itself. It has a companion, ActionMap. The InputMap values are keys for the ActionMap. This allows one single action to be shared by multiple key strokes; you add the action to the ActionMap once with a specific key, and add all key strokes to the InputMap with the same key. Change your code to this: