If an event has the type
sf::Event::KeyPressed, it means that a key has been pressed; it could be any key!
To find out which key was pressed, you then need to check the event's field called key and its field called code, as shown in Jesper's rather clear example.
For more information on events, please read the
tutorial about events EDIT: To address the specific question,
I'm getting a syntax error with: case sf::Event::KeyPressed: 'A';
This is incorrect.
'A'; is a separate statement (which does nothing) and is not evaluated as part of the case, as if you'd written:
case sf::Event::KeyPressed:
'A';
This should help you visualise why it is saying you used the same case twice.