Is there a solution to computing the string representation of a sf::Keyboard::Key that doesn't involve a massive switch or if-else statement?
Ideally, I would like to avoid something like this:
const char *getKeyName(const sf::Keyboard::Key key) {
switch(key) {
case sf::Keyboard::Unknown:
return "Unknown";
case sf::Keyboard::A:
return "A";
case sf::Keyboard::B:
return "B";
case sf::Keyboard::C:
return "C";
// ... All the other keys.
}