As mentioned above, you do not have to use one of these libraries -- you could just use the calls provided by your operating system -- but using a library such as GLUT, SDL, SFML, Allegro, etc. will make things much easier on you and make it easier to write cross-platform code if you wish to do so once you are more experienced.You can find a couple of tutorials on keyboard handling with GLUT here an