Archived

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

HardCorps

"Enter Name:" style keyboard input

Recommended Posts

HardCorps    122
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
HardCorps    122
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