DirectInput Conversion Table

Started by
5 comments, last by Cell 22 years, 2 months ago
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.
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Thanks, I guess I''ll go with WM_CHAR but it would probably be faster with DInput.
quote:Original post by Cell
Thanks, I guess I''ll go with WM_CHAR but it would probably be faster with DInput.


DInput will surely be faster that a window pump.
_______________
Jester, studient programmerThe Jester Home in French
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--
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
-- Eric
Thanks for the help everybody. Roof, thanks for the table.

This topic is closed to new replies.

Advertisement