Converting DirectInput Key codes into ascii chars
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
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.
mcpp.net : __box( DirectInput::Key::A )->ToString();
csharp.net: DirectInput.Key.A.ToString();
vb.net : DirectInput.Key.A.ToString()
csharp.net: DirectInput.Key.A.ToString();
vb.net : DirectInput.Key.A.ToString()
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement