• Advertisement

Archived

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

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

This topic is 5807 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