Jump to content
  • Advertisement
Sign in to follow this  
Dark Star

Converting DirectInput Key codes into ascii chars

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

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
mcpp.net : __box( DirectInput::Key::A )->ToString();
csharp.net: DirectInput.Key.A.ToString();
vb.net : DirectInput.Key.A.ToString()

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!