DirectX SDK |
This topic pertains only to application development in C and C++. See DirectInput Visual Basic Samples.
The KeybdBuf program obtains and displays keyboard data.
Source: (SDK root)\Samples\Multimedia\DInput\src\KeybdBuf
Executable: (SDK root)\Samples\Multimedia\DInput\bin
Each time you press or release a key, the event is recorded on the screen. Keys are identified by their index values (see Keyboard Device Constants).
This sample illustrates how an application can use DirectInput to obtain buffered keyboard data.