// Handle the player quitting
if (Keyboard::isKeyPressed(Keyboard::Escape))
// Handle the player starting the game
if (Keyboard::isKeyPressed(Keyboard::Return))
// Switch between Thomas and Bob
if (Keyboard::isKeyPressed(Keyboard::Q))
// Switch between full and split screen
if (Keyboard::isKeyPressed(Keyboard::E))
Preferences --> Security Options --> (tab) Privacy --> Input Monitoring --> Add here your Application (in my case Clion)