#include <PhxLogicalInputEngine.h>
Public Member Functions | |
| ButtonSpecState () | |
| Constructs a default ButtonSpecState. | |
| ButtonSpecState (const String &driverName, RawInputEngine::ButtonIdentifier button, RawInputEngine::ButtonState triggerState) | |
| Constructs a ButtonSpecState directly from a driver name, identifier, and ButtonState. | |
| ButtonSpecState (const LogicalInputEngine::ButtonSpec &buttonSpec, RawInputEngine::ButtonState triggerState) | |
| Constructs a ButtonSpecState from an existing ButtonSpec and the additional trigger state. | |
| bool | operator== (const ButtonSpecState &b) |
| Equality comparison between two ButtonSpecState's. | |
| bool | operator!= (const ButtonSpecState &b) |
| Inequality comparison between two ButtonSpecState's. | |
| const LogicalInputEngine::ButtonSpec & | buttonSpec () const |
| Gets the ButtonSpec that identifies a raw input button. | |
| RawInputEngine::ButtonState | triggerState () const |
| Gets the trigger state that specifies the state the raw button must enter in order for the logical input engine to regard the button as "triggered". | |
This exists because, in addition to specifying which buttons must be checked by the logical input layer, we must also specify what state they should be in. This requirement shows up in two places.
First, multi-state buttons are not simply "pressed" or "not pressed". It's unclear whether such buttons will be used frequently (it is certainly possible to reduce these cases to simple binary buttons) but since the RawInputEngine does not prevent drivers from outputing more than the standard PRESSED and RELEASED states, the key binder must be able to specify to the LogicalInputEngine which of the states should trigger the logical button or axis.
A more common issue involves modifier keys. The logical input layer has no knowledge of "modifier" keys and hence will interpret Control-A as pressing "Control" and "A" separately. As a result, when Control-A is pressed, a driver that is looking only at the "A" key will incorrectly identify the key press as "Control-A" and not simply "A". Thus, if one action is bound to Control-A and another to A, then both will be triggered when Control-A is pressed. To avoid this scenario the key binder must specify explicitly that Control must not be held when "A" is pressed.
|
|
Constructs a default ButtonSpecState. The buttonSpec() attribute will simply be the default constructed (and invalid) ButtonSpec. triggerState() will be RawInputEngine::PRESSED. |
|
||||||||||||
|
Constructs a ButtonSpecState from an existing ButtonSpec and the additional trigger state.
|
|
|
Gets the ButtonSpec that identifies a raw input button.
|
|
|
Inequality comparison between two ButtonSpecState's.
|
|
|
Equality comparison between two ButtonSpecState's.
|
|
|
Gets the trigger state that specifies the state the raw button must enter in order for the logical input engine to regard the button as "triggered".
|
1.4.2