Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Apr 24, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Detecting Multiple Simultaneous Keypresses

I need to know if you can have more than one keydown at a time because it won't let me turn and fire at the same time. Using the keydown event how do you tell when there is two or more keys down other than the shift, ctrl, and alt keys? like how can you tell when "A and B" are pressed.

Unfortunately, the only keys that can modify other keys are the Shift, Ctrl, and Alt keys. If you press a letter or number key down with another you will get two KeyPress events. The best suggestion I can offer is to change your fire button to be the Ctrl key and your forward motion be the Shift key. You can detect when Ctrl and Shift are down together, or even the Alt key with them. Either way, you can only use those keys together with one alphanumeric character

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date