Jump to content
  • Advertisement

Archived

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

HardCorps

"Enter Name:" style keyboard input

This topic is 5235 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
Advertisement
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.

~HardCorps.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!