I looked for a way to catch all mouse and key events that have no bindings assigned, but I found nothing like this (maybe I overlooked something).
This feature could be handy e.g. for leaving status screens, assigning key-mappings or just to give the user a response like "I got your click, but it was something stupid".
Would it be possible to have something like:
GameControl control = new manager.addControl("control");
control.addBinding(new DefaultKeyBinding());
control.addBinding(new DefaultMouseBinding());
I'm asking for a possibility to get all key and mouseevents that have no bindings assigned.
E.g. when you show the player a status screen like "Congratulations, you eliminated all bandersnatches! Press any key to continue", how would you implement the infamous "any key"?
He said he wants to "catch all mouse and key events that have no bindings assigned". He said it the other way (any key) to help you understand what he wanted. Said another way, he wants to have anything with a binding to do the thing it's supposed to do, and anything that does not have a binding, he wants to handle specially.
I don't have the code in front of me, but in that same package there is code to determine conflicts with keybindings, so you could use that in order to do what you're wanting.
However, I should think that a screen that says "Press any key" even if it appears above your character in the game and you press "walk forward" it should cause the action to be invoked on that screen even if you still wanted to walk forward.
Things brings up an idea for a new feature to GameControl:
public boolean isAnyKey() {
return true;
}
I'll get that checked in if you find it useful. ;)