Microsoft DirectX 8.1 (Visual Basic)

Keyboard Sample

Description

The Keyboard sample program shows how to create a keyboard device and retrieve immediate data from it.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Src\Keyboard

Executable: (SDK root)\Samples\Multimedia\VBSamples\Dinput\Bin\Keyboard.exe

User's Guide

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.

Programming Notes

The background cooperative level is used, so keys are read even when the application does not have the input focus.