hi guys, how do you detect when a key is up using DInput?
if(KEYDOWN(buffer, DIK_RIGHT)) --> that is to detech when the right arrow key is down, how about when it was released?
thanks!!!
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
I dunno, you could set a BOOL on the Keypress event and then
Oli
All the best problems start with C
.:: K o s m o s E n g i n e ::.
if ((blnRightArrowPressed == TRUE) && (KEYDOWN(buffer, DIK_RIGHT) == FALSE)){ // Your code goes here}
Oli
All the best problems start with C
.:: K o s m o s E n g i n e ::.
yikes! KeyUp won''t work, KeyDown is a macro remember? it''s defined like this...
#define KEYDOWN(name,key) (name[key] & 0x80)
#define KEYDOWN(name,key) (name[key] & 0x80)
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
February 25, 2002 09:15 AM
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))
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... ?
it says, when the right arrow key is pressed AND the right arrow KEYDOWN is FALSE.... uh huh... ?
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
anonymouse poster: eh? that things works? hehe, thanks!
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement