So like many other people using SFML2, I'm making a game. Like many other games, it uses several keys on the keyboard to move a sprite around.
The issue is that if I use KeyPressed in the Event Loop to get player movement, I get a sort of "stutter" and it is very unpleasant.
If I use sf::Keyboard to get player movement, it moves smoothly but movement persists when the window is not in focus.
How can I work around this?