Jump to content
  • Advertisement


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


Problems with String input

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

I''ve figured out how to get input from the user so that it can be used for a textbox or something. And it works quite well, except for one part, you have to type very slow! For example, typing "The", results in just "te", since the h and he keys are pressed at about the same time. The way mine works is by checking which keys have gone back up which were previously down. This is getting to be a huge problem, and I haven''t a clue as to how this problem is going to be solved.

Share this post

Link to post
Share on other sites
Put a TranslateMessage() in your message pump and respond to WM_CHAR messages.

Those will be buffered and it''s the easiest and most robust method of handling international keyboards which aren''t the same as the default DirectInput key mapping (try getting an accented character on a Danish keyboard or a Q on a French keyboard using DInput - you''ll see what I mean). DirectInput is intended for getting control input, not text input (Microsoft have said this themselves).

Simon O''''Connor
Creative Asylum Ltd

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!