Microsoft DirectX 8.1 (Visual Basic)

ActionMapper Sample

Description

The ActionMapper sample program demonstrates the retrieval of action-mapped data. It also enables reconfiguration of the keyboard, mouse, and other controller action mappings through the user interface.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectInput\ActionMapper

Executable: Source: (SDK root)\Samples\Multimedia\VBSamples\DirectInput\Bin\VB_ActionMapper.exe

User's Guide

The initial display gives a text feedback of axis movements and button or key presses from the mouse, keyboard, or other controller attached to the system. An EXCLUSIVE | FOREGROUND cooperative level is used so that the mouse cursor is hidden.

Pressing the D key displays the configuration user interface with tabs for the mouse, keyboard, and any other present controller device. If a graphic is available for the controller, it is displayed with callouts indicating which action is associated with which control. Double-clicking a callout label activates the menu of possible actions to apply to that control. To return to the initial screen with the new mappings, click OK.

To terminate the program, press the ESC key from the initial screen.

Programming Notes

You will need to modify ActionMap.cls. For the purpose of this sample, it queries for any and all input devices, and it does not distinguish the source of the input. However, you will usually modify the class to respond to only one given input, or to differentiate the input devices into different players or purposes.

This sample makes use of common DirectX code that is shared with other samples on the DirectX SDK. All common classes and modules can be found in the following directory:

(SDK root)\Samples\Multimedia\VBSamples\Common