"Enter Name:" style keyboard input
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement