FPC: Need unit that can check the state of keys.

I'm currently trying to migrate my Borland Pascal 7.0 game to FreePascal to compile for multiple platforms. However, I need some very specific functions that FreePascal doesn't seem to offer with its standard units. One of these is a unit that can check the state of each key on the keyboard (is it currently pressed or not?). Does such a unit exist? Preferably a system independent unit.

Comments

: I'm currently trying to migrate my Borland Pascal 7.0 game to : FreePascal to compile for multiple platforms. However, I need some : very specific functions that FreePascal doesn't seem to offer with : its standard units. One of these is a unit that can check the state : of each key on the keyboard (is it currently pressed or not?). Does : such a unit exist? Preferably a system independent unit.

I can offer one that reads directly from the keyboard buffer, but I'm not sure if the buffer is given that section of memory by the OS or not, therefore it may not be compatible with Linux (Anyone?) and most definately not Mac.

It scans each keypress and stores it into an array, therefore at any point you can check if a certain key is up or down and will handle (I think) up to about 8 keys at once. Also registers Shift, Ctrl, Alt, etc.

: : I'm currently trying to migrate my Borland Pascal 7.0 game to : : FreePascal to compile for multiple platforms. However, I need some : : very specific functions that FreePascal doesn't seem to offer with : : its standard units. One of these is a unit that can check the state : : of each key on the keyboard (is it currently pressed or not?). Does : : such a unit exist? Preferably a system independent unit.: : I can offer one that reads directly from the keyboard buffer, but : I'm not sure if the buffer is given that section of memory by the OS : or not, therefore it may not be compatible with Linux (Anyone?) and : most definately not Mac.: : It scans each keypress and stores it into an array, therefore at any : point you can check if a certain key is up or down and will handle : (I think) up to about 8 keys at once. Also registers Shift, Ctrl, : Alt, etc.: : Phat Nat

That sounds interesting. Could you mail me the unit. I've sent you my address in a PM. Thanks!