Keyboard button detection

Is there any method to detect dynamically which keyboard button did the user press?

As far I know, you have to bind all keyboard buttons and implements ActionListener or AnalogListener.

inputManager.addMapping("", new KeyTrigger(KeyInput.KEY_0));

That is exactly what I was afraid of. :smiley:

Is there really no easy solution for this? Maybe some KeyTrigger that binds all values?

You can loop through all values of KeyInput.XXX via reflection and then add triggers based on the variable name.

Probably its much easier to just implement RawInputListener? Its designed exactly for the purpose of “configure keyboard controls” screens …