• Advertisement

Archived

This topic is now archived and is closed to further replies.

DirectInput Conversion Table

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

I was wondering if there is a table of some sort to convert DInput DIK_ codes into ASCII codes. Any help on this would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
If there were, it would only work for US keyboards. You''d need a different translation table for each type of keyboard!! (UK keyboard is different to the US one, German keyboard is different, French keyboard is even more different). Keyboards in DirectInput are meant to be used as 100 or so button joypads, nothing more!.

For ASCII text input, use the WM_CHAR message. You get full keymap translation, it works with IME and various accessibility keyboards, it applies the users personal keyboard settings (repeat rate etc) to the input etc. All stuff which DInput doesn''t do, and isn''t intended to do!

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
I have code that will convert the DI stuff to ASCII. IM me on AOL or AIM at ImmigrantMarbles, or email me at VChelaru@hotmail.com. You''ll have MUCH MORE LUCK sending me an instant message, though.

--Vic--

Share this post


Link to post
Share on other sites
The speed of WM_CHARs isn''t an issue at all, considering how rarely a keystroke is generated. You get a lot of functionality from WM_CHARs, especially considering nobody will ever notice the speed difference.


--
Eric

Share this post


Link to post
Share on other sites

  • Advertisement