Sign in to follow this  
Daivuk

DirectInput Language Option

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this