Jump to content
  • Advertisement
Sign in to follow this  
QQemka

DirectInput - realistic keydown with repeat delay?

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

Hello. Is it somehow possible to make directinput scan for repetiotion rather just for keydown? I mean, if you open a notepad and hold "a" you will see "aaaaaaaaaaaaaaaaaaaaa" where first letter spawns instantly, takes a bit for second and rest goes fast. Right now im just getting info "is down" "is not down". Am I on my own and have to implement it from scratch?

 

And by the way, is it normal that i dont see the cursor inside my game window?

 

Greetz

Edited by QQemka

Share this post


Link to post
Share on other sites
Advertisement

The whole point of DirectInput (as well as the newer raw input API's that DInput uses under the hood) is to give you low-level, minimally-filtered data from your input device. This means it won't do things like key repeats, or Unicode translation. If what you want is input that would be suitable for a text box, then you should listen for WM_CHAR messages.

Share this post


Link to post
Share on other sites

Dont want to start another topic, got several issues with directinput mouse:

 

- When after working with different window I set focus back on my game window the mouse pointer is ALWAYS reset to middle of the screen.

- When I press start keyboard button (and so lose focus on my game window) the mouse lands in plast position when game wasnt focused.

- Last, rare issue which is hard to reproduce, sometimes when i launch the game the screen rotates like crazy (its because it detects huge mouse movement) even when i dont move mouse, and sometimes the left mouse button gets completely stuck and i cant click on the windows bar and have to do some magic to kill the process and take control over mouse back

 

How can i fix these issues?

Edited by QQemka

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!