Converting DirectInput Key codes into ascii chars

Started by
2 comments, last by GameDev.net 19 years, 6 months ago
Hi Gamedev Forum, I just wanted to know if there is a way to convert from DirectInput's key codes into ascii characters and how I would handle someone typing and pressing SHIFT then a letter. I do notice that while DirectInput is running the normal C++ library functions such as getch() dont seem to work so well. Is there a way round this so I can still capture the ascii characters from keyboard? Thanks In advance DarkStar UK
---------------------------------------------You Only Live Once - Don't be afriad to take chances.
Advertisement
Hi!

http://www.gamedev.net/reference/articles/article842.asp

Bye!
If you want to do string input, using the WM_CHAR Windows message is definetly easier than DirectInput. Here is a particularly good thread about it. The WM_CHAR message automatically handles different keyboard layouts, IME, and shifting.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
mcpp.net : __box( DirectInput::Key::A )->ToString();
csharp.net: DirectInput.Key.A.ToString();
vb.net : DirectInput.Key.A.ToString()

This topic is closed to new replies.

Advertisement