Usually, in my games, I have a list of these ifstatements:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) || sf::Keyboard::isKeyPressed(sf::Keyboard::W))
// Stuff
}
(Or something similar)
Now yes, while this does work, it doesn't exactly look very neat, and sometimes, when I map over 3 keys to a single input, the line wraps and looks very messy.
A good fix would be to create an overload of the sf::Keyboard::isKeyPressed() function allowing for the input of a vector (or some other form of array) of keys. For example:
std::vector<sf::Keyboard> Keys = {sf::Keyboard::A, sf::Keyboard::D, sf::Keyboard::W, sf::Keyboard::S};
if (sf::Keyboard::isKeyPressed(Keys)){
//stuff
}
And this would have the same effect of this:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A) || sf::Keyboard::isKeyPressed(sf::Keyboard::D, sf::Keyboard::isKeyPressed(sf::Keyboard::W) || sf::Keyboard::isKeyPressed(sf::Keyboard::S))){
// Stuff
}
Yes, this feature doesn't greatly impact the actual framework much, but overall it just makes code much cleaner and easier to read.