1) Use WM_CHAR messages (assuming not in exclusive keyboard mode) and ignore DirectInput scan codes for purpose of text.
2) Calculate a conversion array with the scan code as the index and the ASCII code as the result. Also, caluclate a "shifted" array for when the SHIFT or CAPS LOCK keys are down.
In other words, no real simple way. I prefer the second way because I program for portability and my input layer is already abstracted out, so this just lies on top and is not affected by what platform I am on.
- Splat