The following constants are used in the dwSemantic member of the DIACTION structure to map an action to any matching control on the device.
typedef enum Any_Control { DIAXIS_ANY_1, DIAXIS_ANY_2, DIAXIS_ANY_3, DIAXIS_ANY_3, DIAXIS_ANY_A_1, DIAXIS_ANY_A_1, DIAXIS_ANY_B_1, DIAXIS_ANY_B_2, DIAXIS_ANY_C_1, DIAXIS_ANY_C_2, DIAXIS_ANY_R_1, DIAXIS_ANY_R_2, DIAXIS_ANY_S_1, DIAXIS_ANY_S_2, DIAXIS_ANY_U_1, DIAXIS_ANY_U_2, DIAXIS_ANY_V_1, DIAXIS_ANY_V_2, DIAXIS_ANY_X_1, DIAXIS_ANY_X_2, DIAXIS_ANY_Y_1, DIAXIS_ANY_Y_2, DIAXIS_ANY_Z_1, DIAXIS_ANY_Z_2, DIBUTTON_ANY, DIPOV_ANY_1, DIPOV_ANY_2, DIPOV_ANY_3, DIPOV_ANY_4, } Any-Control, *LPAny-Control;
These constants can be used to map an application action to a virtual control that is not defined in a genre. Such actions are mapped after genre-specific actions. If the mapper has already mapped all matching controls to genre-specific actions, the any-control action is left unmapped.
Any-control actions are treated with equal priority. If a device has one x-axis and the action array specifies DIAXIS_ANY_1 and DIAXIS_ANY_X_1, the action mapped to the x-axis is the one that appears first in the action array.
DIBUTTON_ANY(x) can accept any value from 0 through 255. Do not use an index more than once. For instance, the following set of DIACTION structures would be invalid.
{eB_MUTE, DIBUTTON_ANY(0), 0, "Toggle Sound",}, {eB_VOLUP, DIBUTTON_ANY(0), 0, "Volume Up", }, {eB_VOLDOWN, DIBUTTON_ANY(0), 0, "Volume Down", },
The correct method uses different indexes, as shown below.
{eB_MUTE, DIBUTTON_ANY(0), 0, "Toggle Sound",} {eB_VOLUP, DIBUTTON_ANY(1), 0, "Volume Up", } {eB_VOLDOWN, DIBUTTON_ANY(2), 0, "Volume Down", }