getting "typing style" input while directinput has the keyboard

Started by
4 comments, last by billybob 21 years ago
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.
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
i thought that if the device is exclusive windows doesn''t get the message.
Check this function: GetKeyboardState

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference/KeyboardInputFunctions/GetKeyboardState.asp
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.
i''ll just use a timer and get repeat rate working correctly, from dx''s key data.

This topic is closed to new replies.

Advertisement