I have no idea if you can use || inside a switch like that...
Here is a snippet from my main-loop. Note that I wrote the class "Input" myself but you could always use sf::Keyboard::isKeyPressed() or something else.
while(window.isOpen())
{
Input::Update();
sf::Event event;
while(window.pollEvent(event))
{
switch (event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::KeyPressed:
if(hasFocus)
if(Input::KeyDown(sf::Keyboard::Escape))
window.close();
break;
case sf::Event::LostFocus:
hasFocus = GL_FALSE;
break;
case sf::Event::GainedFocus:
hasFocus = GL_TRUE;
break;
case sf::Event::TextEntered:
if(event.text.unicode <= 255)
console.AppendText(static_cast<GLubyte>(event.text.unicode));
break;
default:
break;
}
}