Jump to content
  • Advertisement


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


"Enter Name:" style keyboard input

This topic is 5414 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 Everyone, I am looking for a (i''m sure there is a standard) way of capturing & displaying keyboard input as it is typed. Ideally without manually writing the code for every key on the keyboard and translating/displaying it. GLUT maybe? Any help would be greatly appreciated. Thanks in advance ~HardCorps.

Share this post

Link to post
Share on other sites
Well, I think i''ve got myself an idea.

I''m going to take the wParam of the WM_KEYDOWN windows Message (while checking that it''s not being held down), and if it''s ascii value is between 65 & 90 or 97 & 122 then I''ll append it to a string and draw the string every frame. If it''s the Backspace key then i''ll remove the last character in the string and draw it.

I''m not sure why I didn''t think of it before.

Anyway, I''m always open to better ideas.

Thanks guys.


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!