VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Virtual Key Checker (emulates DirectInput with API)

Javin  (3 Submissions)   Games   Visual Basic 5.0   Advanced   Wed 3rd February 2021

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.

Rate Virtual Key Checker (emulates DirectInput with API) (3(3 Vote))

Download Virtual Key Checker (emulates DirectInput with API)

Virtual Key Checker (emulates DirectInput with API) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters