Not sure how how Glut does it, but JEDI-SDL (http://www.sf.net/projects/jedi-sdl ) coupled with OpenGL makes it very easy to handle Input. We have also ported quite a few of the nehe.gamedev.net demos over. It works with FreePascal, Kylix and Delphi with some preliminary support for GNU Pascal as well.