Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

mickey

hi guys, how do you detect when a key is up using DInput?

This topic is 5989 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

if(KEYDOWN(buffer, DIK_RIGHT)) --> that is to detech when the right arrow key is down, how about when it was released? thanks!!!

Share this post


Link to post
Share on other sites
Advertisement
yikes! KeyUp won''t work, KeyDown is a macro remember? it''s defined like this...
#define KEYDOWN(name,key) (name[key] & 0x80)


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by mickey
yikes! KeyUp won''t work, KeyDown is a macro remember? it''s defined like this...
#define KEYDOWN(name,key) (name[key] & 0x80)





#define KEYUP(name, key) (!(name[key] & 0x80))

Share this post


Link to post
Share on other sites
hmm.. wait i think there''s soemthing wrong with your code there...
it says, when the right arrow key is pressed AND the right arrow KEYDOWN is FALSE.... uh huh... ?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!