• Advertisement
Sign in to follow this  

DirectInput Language Option

This topic is 4503 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 In my engine i'm using DirectInput for my keyboard entries. But when writing text, directInput interpret it always in English keyboard. But not all the people configure their keyboard in english, so I want my engine to adapt to the user windows language configuration. I read in msdn that DI doesnt have any function for translation and will always interpret it in english. But if we take a game like : Counter Strike Source If I change my keyboard configuration (Canadian Multilingue for exemple), it will change in the game too. But they are probably using DI (since source engine is DX powered) So is there exist any function or librairy that can take the DI input key and translate it OR the inverse.?? Thanks for help!

Share this post


Link to post
Share on other sites
Advertisement
DirectInput basically treats the keyboard as a controller with many buttons. It doesn't know them as 'keys' and it associates no language to them. Rather, it is meant for reading the scan-codes being generated. These scan-code basically just contain two values: One for the button pressed and one for the state of that button (up or down).

That being said, you shouldn't use DirectInput for text. Use Windows messages instead.

Share this post


Link to post
Share on other sites
Quote:
Original post by lack o comments
That being said, you shouldn't use DirectInput for text. Use Windows messages instead.

Specifically, the WM_CHAR message is great for text input. It handles all of the stuff that you need, including different charsets, shifting/caps-lock, key repeating, ect...

Share this post


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

  • Advertisement