Microsoft DirectX 8.1 (Visual Basic) |
The Keyboard sample program shows how to create a keyboard device and retrieve immediate data from it.
Source: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Src\Keyboard
Executable: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Bin\Keyboard.exe
As you press one or more keys while the application has focus, the names of the keys (from CONST_DIKEYFLAGS) are displayed in the list box.
The background cooperative level is used, so keys are read even when the application does not have the input focus.