Advertisement
2_2002-2004 Games #114348

Virtual Key Checker (emulates DirectInput with API)

I want to appologize in advance for the complete lack of commenting, or direction with this code. Note that this is for ADVANCED users. If you can't figure it out, I don't want to hear it. I didn't actually intend to post this for other people, so I didn't take any steps to make it easier to use, but I got to thinking maybe someone else can use it. This uses only Windows API but has most of the same functionality as DirectX's InputEngine. Even quite a bit of functionality that DirectX's Input Engine doesn't have. About the only thing it doesn't do is joysticks. (Yet.) Believe it or not, the speed is actually comperable to DirectX too, and I often use this instead of the DirectX InputEngine in my DirectX apps. It's fairly simple and straightforward (which is good since there's no accompanying examples). You create an instance of the class, and if you want to see if a key was pressed since the last time the object was called, you would check the value of VKObject.Pressed(VK_KEYNAME). Has handlers for mouse functions too.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine