please review the attached patch.
It moves the code that manages the input map into a separate class and
uses a C++ std::map for this instead of the former fixed array based
approach. I find this code is now more understandable.
Additionally that makes race_gui.cpp a bit smaller and I am planning to
fix the remaining messiness in this class in the long run.