Quote Originally Posted by WILL
Well that's a good start. I assume you are using SDL now?

SDL has an event handling system which will allow you to keep track on all your input devices (keyboard, mouse, joysticks, etc) button presses and releases along with Mouse cursor position and joystick analog stick positions. It's quite handy and it's all in the main SDL library so you only need to add any of the others for it.

Have a read of the following pages, these will give you more information on how to work with input devices. Some of the code may be in C, but the variable, constant and function names are the exact same so all you have to understand is the proper usage...

libsdl.org site's Quick tutorials: http://www.libsdl.org/cgi/docwiki.cgi/SDL_Guide (look into the Input section)

Freepascal meets SDL is a great site: http://freepascal-meets-sdl.net/ (and it's ALL in Pascal! )

freepascal wiki's information about SDL: http://wiki.freepascal.org/FPC_and_SDL (some extra stuff you can read to learn more about SDL, just don't get carried away until you learned the basics)
i have read some of it, but that unit is still too difficult for me(i have earnd pascal for less than a year )