Jump to content
  • Advertisement

Archived

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

billybob

getting "typing style" input while directinput has the keyboard

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

how do you get input from typing while the keyboard is active? regular directinput keyboard doesn''t cut it, it doesn''t have a repeat rate, and you can press more than one key a time. i can write one using timers and stuff, but i''d rather directinput have a way of getting it. all i really need is a function returning a char, like char GetCurrentKeyTyped() or something.

Share this post


Link to post
Share on other sites
Advertisement
use the WM_CHAR message for typing-style input.

''There''s something out there....something stupid...''
''I think I''m going to be ill. Is that a problem for you?''
''[You] overestimate my conscience by assuming that I have one.''
- Daria

Share this post


Link to post
Share on other sites
Check this function: GetKeyboardState

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference/KeyboardInputFunctions/GetKeyboardState.asp

Share this post


Link to post
Share on other sites
Hi i got typing style input working on my dx model, you have to use bufferd input, then what i did is to use 2 buffers one for key presses and one for current keys down, every time a key is pressed, [down and then up event] i write that key into the key pressed buffer, and i just read from the key pressed buffer. Only thing that i havn''t got working yet is repeating. The current keys down buffer i clear after each frame. I use this buffer for the movement and stuff in my engine.

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!