I’d like to support rebindable keys in my game. As far as I can tell, this requires me to create a mapping from Urho key identifiers to user-visible names, poll for keyboard input while in rebinding mode, loop through all the keys to find out which ones are pressed, and then come up with the appropriate textual representation. Then I want to save this information to a config file in a human-readable format, so that means parsing that textual representation as well…
Repeat the same for mouse buttons.
For joysticks, it’s even more fun. I can show the user “Joystick 1 Axis 3”, but I’d rather be able to show them something like “XBox 360 Controller 1 Left Trigger”, ideally with appropriate graphic.
Has anyone got a good library for this? I know it’s not builtin because the editor keys are hard-coded (which is so fun with my Dvorak keyboard…)