Created
July 14, 2012 20:46
-
-
Save ngscheurich/3113293 to your computer and use it in GitHub Desktop.
Detect keyboard input using SFML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @library SFML 2.0 RC | |
while (window.isOpen()) { | |
sf::Event event; | |
while (window.pollEvent(event)) { | |
switch (event.type) { | |
case sf::Event::KeyPressed: | |
cout << event.key.code; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment