Platform SDK: DirectX |
This topic pertains only to application development in Visual Basic. See DirectInput C/C++ Samples.
The Keyboard sample 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 hold down one or more keys, the names of the keys (from CONST_DIKEYFLAGS) are shown in the list box.
The background cooperative level is used, so keys are read even when the application does not have the input focus.