Hello SFML community!
I was wondering about implementing customizable controls for a game I'm currently working on, and this question somewhat popped up on my mind: Is there any way we can convert an sf::keyboard::key (say, A) into its char/string name counterpart?
In order to create an actual options/controls screen, I'd need to be able to convert a sf::keyboard::key into a string of what it represents, which will be shown to the screen. Currently though, the only thing I can think of is manually represent each code as a specific char or string (using a ton of ifs to assign sf::keyboard::key::A into "A", sf::keyboard::key::Lshift into "Left Shift", etc).
I'm pretty sure i'm not the first to face this problem, so is there a better alternative to this?
Thanks in advance