Archived

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

DirectInput/vb6 key is being pressed

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

Hi, I''m using directinput8 to get inputs from my game. I''m able to get keydown event and keyup event...but what is the user is stil hlding the key!!! i want it to reapeat to same action as the keydown event... since im using DirectXEvent8_CallBack()...it only calls this function when a key down or key up occurs...so it wont callback if the key is still down...does anyone has a solution or a hint? Thanks.

Share this post


Link to post
Share on other sites
Are you using buffered input? You could use immediate input to check the current state of the device. That way, your render loop would just check to see if a particular key has been pressed down and take any action necessary.

For things like toggles and such (for example, hitting ''n'' for "nightvision" or something) you could just use standard Win32 messages. This kind of thing works pretty well.

neneboricua

Share this post


Link to post
Share on other sites
I''m using event based input...so I''m cheking the input only when an input occurs...the problem is that i can catch keydown(&H80& or 128) ,keyup( 0 ) but not keypress(???) events!!

Share this post


Link to post
Share on other sites