CodeBase - Stopping Key And Mouse Button Repeating
Return to the CodeBase listing
Category: Input
Version: 1.0
Information
Uploaded: 13th May 2004 05:56
Modified: 13th May 2004 13:18
Author: WhizzRich
Summary
To make a key or mouse button work only once, no matter how long you hold it for.
Full Description
For use in every single game you could possibly make.<br /> <br /> For example: when you need to press S to save the game, you don't want the game saving for every game loop the S button is held down. You only want it to save the one time you press S, and to save it again you would let go and press S again.<br /> <br /> Should be easy enough to adapt the code for joysticks. You don't need the repeat part of the code, it is just simply much quicker than writing the code for every button on the keyboard.<br /> <br /> *Attached is a picture of a keyboard and the ASCII values for each button.<br /> <br /> Thanks,<br /> Rich (WhizzRich)
Comments
No comments yet.