Simple Keyboard input interpreter
Build Gun buildandgun HLGE Input Allegro5 Game Development Gamedev
You are free to take a look at the example code as well as download the entire Code::Blocks project.
You'll need the following in order to compile this code:
Allegro 5 working binaries.
See it here: http://www.BuildAndGun.com