Microsoft DirectX 8.1 (Visual Basic) |
When using Microsoft® DirectInput®, consider the keyboard not as a text input device but as a game pad with many buttons. When your application requires text input, do not use DirectInput methods. It is far easier to retrieve the data from the normal Microsoft Windows® messages, which enable you take advantage of services such as character repeat and translation of physical keys to virtual keys. This is particularly important for languages other than English, which can require special translations of key presses.
To set up the keyboard device for data retrieval, you must first call the DirectInputDevice8.SetCommonDataFormat method with DIFORMAT_KEYBOARD as the parameter.
The following sections give more information about obtaining and interpreting keyboard data: