Steam Controller support API.
This API has been deprecated in favor of ISteamInput - please see
ISteamInput Interface for API info
See the
Steam Input documentation for more information.
Funcții membru
Member functions for
ISteamController
are called through the global accessor function
SteamController()
.
ActivateActionSet
void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle );
Reconfigure the controller to use the specified action set (ie "Menu", "Walk", or "Drive").
This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in your state loops, instead of trying to place it in all of your state transitions.
Example:void updateStateLoop()
{
switch( currentState )
{
case MENU:
SteamController()->ActivateActionSet( controllerHandle1, menuSetHandle );
doMenuStuff();
break;
case WALKING:
SteamController()->ActivateActionSet( controllerHandle1, walkingSetHandle );
doWalkingStuff();
break;
case DRIVING:
SteamController()->ActivateActionSet( controllerHandle1, drivingSetHandle );
doDrivingStuff();
break;
case FIGHTING:
SteamController()->ActivateActionSet( controllerHandle1, fightingSetHandle );
doFightingStuff();
break;
}
}
Activate All Controllers
Oftentimes, you'll want to activate all the controllers at once, rather than a single device. For this you should use the constant
STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS as your controller handle. You can likewise use this value in any other function that calls for an individual controller handle.
Example:void updateStateLoop()
{
switch( currentState )
{
case MENU:
SteamController()->ActivateActionSet( STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS, menuSetHandle );
doMenuStuff();
break;
case WALKING:
SteamController()->ActivateActionSet( STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS, walkingSetHandle );
doWalkingStuff();
break;
case DRIVING:
SteamController()->ActivateActionSet( STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS, drivingSetHandle );
doDrivingStuff();
break;
case FIGHTING:
SteamController()->ActivateActionSet( STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS, fightingSetHandle );
doFightingStuff();
break;
}
}
ActivateActionSetLayer
void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to activate an action set layer for. |
actionSetHandle | ControllerActionSetHandle_t | The handle of the action set layer you want to activate. |
Reconfigure the controller to use the specified action set layer.
See the
Action Set Layers article for full details and an in-depth practical example.
Example:SteamController()->ActivateActionSetLayer( controllerHandle1, myActionSetLayer );
DeactivateActionSetLayer
void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to deactivate an action set layer for. |
actionSetHandle | ControllerActionSetHandle_t | The handle of the action set layer you want to deactivate. |
Reconfigure the controller to stop using the specified action set layer.
Exemplu:SteamController()->DeactivateActionSetLayer( controllerHandle1, myActionSetLayer );
DeactivateAllActionSetLayers
void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to deactivate all action set layers for. |
Reconfigure the controller to stop using all action set layers.
Example:SteamController()->DeactivateAllActionSetLayers( controllerHandle1 );
GetActiveActionSetLayers
int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut );
Fill an array with all of the currently active action set layers for a specified controller handle.
Example:ControllerHandle_t *handlesOut = new ControllerHandle_t [];
SteamController()->GetActiveActionSetLayers( controllerHandle1, &handlesOut );
GetActionSetHandle
ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName );
Name | Type | Description |
pszActionSetName | const char * | The string identifier of an action set defined in the game's VDF file. |
Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
Returnează: ControllerActionSetHandle_tThe handle of the specified action set.
Example:ControllerActionSetHandle_t fightingSetHandle = SteamController()->GetActionSetHandle( "fighting" );
GetAnalogActionData
ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle );
Returns the current state of the supplied analog game action.
Returnează: ControllerAnalogActionData_tThe current state of the specified analog action.
Example:ControllerAnalogActionData_t data = SteamController()->GetAnalogActionData( controller1Handle, moveHandle );
GetAnalogActionHandle
ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName );
Name | Type | Description |
pszActionName | const char * | The string identifier of the analog action defined in the game's VDF file. |
Get the handle of the specified Analog action.
NOTE: This function does not take an action set handle parameter. That means that each action in your VDF file must have a unique string identifier. In other words, if you use an action called "up" in two different action sets, this function will only ever return one of them and the other will be ignored.
Returnează: ControllerAnalogActionHandle_tThe handle of the specified analog action.
Example:ControllerAnalogActionHandle_t moveHandle = SteamController()->GetAnalogActionHandle( "move" );
GetAnalogActionOrigins
int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut );
Get the origin(s) for an analog action within an action set by filling originsOut with EControllerActionOrigin handles. Use this to display the appropriate on-screen prompt for the action.
Returnează: int
The number of origins supplied in
originsOut
.
Example:EControllerActionOrigin *origins = new EControllerActionOrigin[];
SteamController()->GetAnalogActionOrigins( controller1Handle, walkingSetHandle, moveHandle, origins );
GetConnectedControllers
int GetConnectedControllers( ControllerHandle_t *handlesOut );
Enumerates currently connected controllers by filling handlesOut with controller handles.
Returnează: int
The number of handles written to
handlesOut
.
Example:ControllerHandle_t *controllerHandles = new ControllerHandle_t[];
SteamController()->GetConnectedControllers( controllerHandles );
GetControllerForGamepadIndex
ControllerHandle_t GetControllerForGamepadIndex( int nIndex );
Name | Type | Description |
nIndex | int | The index of the emulated gamepad you want to get a controller handle for. |
Returns the associated controller handle for the specified emulated gamepad. Can be used with GetInputTypeForHandle to determine the controller type of a controller using Steam Input Gamepad Emulation.
Returnează: ControllerHandle_tExample:// Replace with the Xinput Slot you are querying for. This number is between 0 and 3
int nXinputSlotIndex = 0;
ControllerHandle_t controllerHandle = SteamController()->GetControllerForGamepadIndex( nXinputSlotIndex );
if ( controllerHandle == 0 )
{
// Valid handles are non-zero, this is a normal Xbox controller.
}
else
{
ESteamInputType inputType = SteamController()->GetInputTypeForHandle(controllerHandle);
switch(inputType)
{
case k_ESteamInputType_Unknown:
printf("unknown\n!"); break;
case k_ESteamInputType_SteamController:
printf("Steam controller\n!"); break;
case k_ESteamInputType_XBox360Controller:
printf("XBox 360 controller\n!"); break;
case k_ESteamInputType_XBoxOneController:
printf("XBox One controller\n!"); break;
case k_ESteamInputType_GenericXInput:
printf("Generic XInput\n!"); break;
case k_ESteamInputType_PS4Controller:
printf("PS4 controller\n!"); break;
}
}
GetCurrentActionSet
ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to query. |
Get the currently active action set for the specified controller.
Returnează: ControllerActionSetHandle_tThe handle of the action set activated for the specified controller.
Example:ControllerActionSetHandle_t controller1Set = SteamController()->GetCurrentActionSet(controller1Handle);
GetDigitalActionData
ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle );
Returns the current state of the supplied digital game action.
Returnează: ControllerDigitalActionData_tThe current state of the specified digital action.
GetDigitalActionHandle
ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName );
Name | Type | Description |
pszActionName | const char * | The string identifier of the digital action defined in the game's VDF file. |
Get the handle of the specified digital action.
NOTE: This function does not take an action set handle parameter. That means that each action in your VDF file must have a unique string identifier. In other words, if you use an action called "up" in two different action sets, this function will only ever return one of them and the other will be ignored.
Returnează: ControllerDigitalActionHandle_tThe handle of the specified digital action.
Example:ControllerDigitalActionHandle_t punchHandle = SteamController()->GetDigitalActionHandle( "punch" );
GetDigitalActionOrigins
int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut );
Get the origin(s) for a digital action within an action set by filling
originsOut
with
EControllerActionOrigin handles. Use this to display the appropriate on-screen prompt for the action.
Returnează: int
The number of origins supplied in
originsOut
.
Example:EControllerActionOrigin *origins = new EControllerActionOrigin[];
SteamController()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins );
GetGamepadIndexForController
int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle );
Name | Type | Description |
ulControllerHandle | ControllerHandle_t | The handle of the controller you want to get a gamepad index for. |
Returns the associated gamepad index for the specified controller, if emulating a gamepad.
Returnează: int
Example:int gamepadIndex = SteamController()->GetGamepadIndexForController( controller1Handle );
GetGlyphForActionOrigin
const char * GetGlyphForActionOrigin( EControllerActionOrigin eOrigin );
Get a local path to art for on-screen glyph for a particular origin.
Returnează: const char *
The path to the png file for the glyph.
E.g.
"C:\Program Files (x86)\Steam\tenfoot\resource\images\library\controller\api\ps4_button_x.png"
Example:// Get origins for "punch"
EControllerActionOrigin *origins = new EControllerActionOrigin[];
SteamController()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins );
EControllerActionOrigin firstOrigin = origins[0]; //i.e, k_EControllerActionOrigin_PS4_X
// This is a function from the game itself that tries to get custom glyph art
int glyphTextureID = getHardCodedButtonGlyphTexture( firstOrigin );
// We didn't ship any art in our game for this origin! I guess Steam has added support for
// a new controller or we just forgot to add this art!
//(i.e, we only have Steam Controller glyphs, but it's a PlasyStation 4 Controller)
if( glyphTextureID == -1 )
{
// Just get the image from the Steam client instead.
const char *localGlyphPath = SteamController()->GetGlyphForActionOrigin( firstOrigin );
printf( "path = %s\n", localGlyphPath ); // "path = C:\Program Files (x86)\Steam\tenfoot\resource\images\library\controller\api\ps4_button_x.png"
//a function from the game that turns a file path into a usable game texture
glyphTextureID = loadButtonGlyphTextureFromLocalPath( localGlyphPath );
}
GetInputTypeForHandle
ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller whose input type (device model) you want to query |
Returns the input type (device model) for the specified controller. This tells you if a given controller is a Steam controller, XBox 360 controller, PS4 controller, etc. For more details, see Steam's
Supported Controller Database.
Returnează: ESteamInputTypeExample:ESteamInputType inputType = SteamController()->GetInputTypeForHandle(controller1Handle);
switch(inputType)
{
case k_ESteamInputType_Unknown:
printf("unknown\n!"); break;
case k_ESteamInputType_SteamController:
printf("Steam controller\n!"); break;
case k_ESteamInputType_XBox360Controller:
printf("XBox 360 controller\n!"); break;
case k_ESteamInputType_XBoxOneController:
printf("XBox One controller\n!"); break;
case k_ESteamInputType_GenericXInput:
printf("Generic XInput\n!"); break;
case k_ESteamInputType_PS4Controller:
printf("PS4 controller\n!"); break;
}
GetMotionData
ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to get motion data for. |
Returns raw motion data for the specified controller.
Returnează: ControllerMotionData_tExample:ControllerMotionData_t motionData = SteamController()->GetControllerMotionData( controllerHandle );
GetStringForActionOrigin
const char * GetStringForActionOrigin( EControllerActionOrigin eOrigin );
Returns a localized string (from Steam's language setting) for the specified origin.
Returnează: const char *
Example:EControllerActionOrigin *origins = new EControllerActionOrigin[];
SteamController()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins );
const char * punchString = SteamController()->GetStringForActionOrigin( origins[0] );
printf("punch = %s\n",punchString);
Init
bool Init();
Must be called when starting use of the
ISteamController interface.
Returnează: bool
Always returns
true.
Example:SteamController()->Init();
RunFrame
void RunFrame();
Synchronize API state with the latest Steam Controller inputs available. This is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest possible latency, you can call this directly before reading controller state.
Example:SteamController()->RunFrame();
SetLEDColor
void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. |
nColorR | uint8 | The red component of the color to set (0-255). |
nColorG | uint8 | The green component of the color to set (0-255). |
nColorB | uint8 | The blue component of the color to set (0-255). |
nFlags | unsigned int | Bit-masked flags combined from values defined in ESteamControllerLEDFlag. |
Set the controller LED color on supported controllers.
Notes:The VSC does not support any color but white, and will interpret the RGB values as a greyscale value affecting the brightness of the Steam button LED.
The DS4 responds to full color information and uses the values to set the color & brightness of the lightbar.
Example:// Restore the user default color for controller 1:
SteamController()->SetLEDColor( controller1Handle, 0, 0, 0, k_ESteamControllerLEDFlag_RestoreUserDefault );
// Set the color to magenta for controller 2:
SteamController()->SetLEDColor( controller2Handle, 255, 0, 255, k_ESteamControllerLEDFlag_SetColor );
ShowAnalogActionOrigins
bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition );
Deprecated.
Returnează: bool
Always returns
true.
ShowBindingPanel
bool ShowBindingPanel( ControllerHandle_t controllerHandle );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller you want to bring up the binding screen for. |
Invokes the Steam overlay and brings up the binding screen.
Returnează: bool
true for success;
false if overlay is disabled/unavailable, or the user is not in Big Picture Mode.
Example:SteamController()->ShowBindingPanel( myControllerHandle );
ShowDigitalActionOrigins
bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition );
Deprecated.
Returnează: bool
Always returns
true.
Shutdown
bool Shutdown();
Must be called when ending use of the
ISteamController interface.
Returnează: bool
Always returns
true.
Example:SteamController()->Shutdown();
StopAnalogActionMomentum
void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction );
Stops the momentum of an analog action (where applicable, ie a touchpad w/ virtual trackball settings).
NOTE:This will also stop all associated haptics. This is useful for situations where you want to indicate to the user that the limit of an action has been reached, such as spinning a carousel or scrolling a webpage.
Example:SteamController()->StopAnalogActionMomentum( controller1Handle, moveHandle );
TriggerHapticPulse
void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. |
eTargetPad | ESteamControllerPad | Which haptic touch pad to affect. |
usDurationMicroSec | unsigned short | Duration of the pulse, in microseconds (1/1,000,000th of a second) |
Triggers a (low-level) haptic pulse on supported controllers.
Notes:Currently only the VSC supports haptic pulses.
This API call will be ignored for all other controller models.
The typical max value of an unsigned short is 65535, which means the longest haptic pulse you can trigger with this method has a duration of 0.065535 seconds (ie, less than 1/10th of a second). This function should be thought of as a low-level primitive meant to be repeatedly used in higher-level user functions to generate more sophisticated behavior.
Example://Pulse once for 1/20th of a second
SteamController()->TriggerHapticPulse(controller1Handle, k_ESteamControllerPad_Left, 50000);
TriggerRepeatedHapticPulse
void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. |
eTargetPad | ESteamControllerPad | Which haptic touch pad to affect. |
usDurationMicroSec | unsigned short | Duration of the pulse, in microseconds (1/1,000,000th of a second). |
usOffMicroSec | unsigned short | Duration of the pause between pulses, in microseconds. |
unRepeat | unsigned short | Number of times to repeat the usDurationMicroSec / usOffMicroSec duty cycle. |
nFlags | unsigned int | Currently unused and reserved for future use. |
Triggers a repeated haptic pulse on supported controllers.
Notes:Currently only the VSC supports haptic pulses.
This API call will be ignored for incompatible controller models.
This is a more user-friendly function to call than TriggerHapticPulse as it can generate pulse patterns long enough to be actually noticed by the user.
Changing the usDurationMicroSec and usOffMicroSec parameters will change the "texture" of the haptic pulse.
Example://Pulse for 1 second with an on/off pulse pattern of 1/20th of a second each
SteamController()->TriggerRepeatedHapticPulse( controller1Handle, k_ESteamControllerPad_Left, 50000, 50000, 10 );
TriggerVibration
void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. |
usLeftSpeed | unsigned short | The intensity value for the left rumble motor. |
usRightSpeed | unsigned short | The intensity value of the right rumble motor. |
Trigger a vibration event on supported controllers.
Notes:This API call will be ignored for incompatible controller models.
This generates the traditional "rumble" vibration effect.
The VSC will emulate traditional rumble using its haptics.
Example:SteamController()->TriggerVibration( controller1Handle, 10000, 10000 );
GetActionOriginFromXboxOrigin
EControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, EXboxOrigin eOrigin );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. You can use GetControllerForGamepadIndex to get this handle |
eOrigin | EXboxOrigin | This is the button you want to get the image for ex: k_EXboxOrigin_A |
Returnează: EControllerActionOrigin
Get an action origin that you can use in your glyph look up table or passed into GetGlyphForActionOrigin or GetStringForActionOrigin
Exemplu:int nXinputSlot = 1; // Substitute whatever the correct Xinput slot is for your player
ControllerHandle_t controller1Handle = GetControllerForGamepadIndex( nXinputSlot );
EControllerActionOrigin buttonOrigin = SteamController()->GetActionOriginFromXboxOrigin( controller1Handle, k_EXboxOrigin_A );
// Get the image from the Steam client .
const char *localGlyphPath = SteamController()->GetGlyphForActionOrigin( buttonOrigin );
printf( "path = %s\n", localGlyphPath ); // "path = C:\Program Files (x86)\Steam\tenfoot\resource\images\library\controller\api\ps4_button_x.png"
//a function from the game that turns a file path into a usable game texture
glyphTextureID = loadButtonGlyphTextureFromLocalPath( localGlyphPath );
TranslateActionOrigin
EControllerActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to affect. You can use GetControllerForGamepadIndex to get this handle |
eDestinationInputType | ESteamInputType | The controller type you want to translate to. Steam will pick the closest type from your SDK version if k_ESteamInputType_Unknown is used |
eSourceOrigin | EControllerActionOrigin | This is the button you want to translate |
Returnează: EControllerActionOrigin
Get the equivalent origin for a given controller type or the closest controller type that existed in the SDK you built into your game if eDestinationInputType is k_ESteamInputType_Unknown. This action origin can be used in your glyph look up table or passed into GetGlyphForActionOrigin or GetStringForActionOrigin
Exemplu:int nXinputSlot = 1; // Substitute whatever the correct Xinput slot is for your player
ControllerHandle_t controller1Handle = GetControllerForGamepadIndex( nXinputSlot );
EControllerActionOrigin buttonOrigin = SteamController()->GetActionOriginFromXboxOrigin( controller1Handle, k_EXboxOrigin_A ); //i.e, k_EControllerActionOrigin_PS4_X
if ( buttonOrigin >= k_EControllerActionOrigin_Count )
{
// We didn't ship any art in our game for this origin! I guess Steam has added support for
// a new controller. Let's get the closest value that was supported by the SDK we built against
buttonOrigin = SteamController()->TranslateActionOrigin( k_ESteamInputType_Unknown, buttonOrigin )
}
// This is a function from the game itself that tries to get custom glyph art
int glyphTextureID = getHardCodedButtonGlyphTexture( actionOrigin );
GetControllerBindingRevision
bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, int *pMajor, int *pMinor );
Name | Type | Description |
controllerHandle | ControllerHandle_t | The handle of the controller to query. |
pMajor | int * | Pointer to int that Major binding revision will be populated into |
pMinor | int * | Pointer to int that Minor binding revision will be populated into |
Returnează: bool - true if a device binding was successfully found and false if the binding is still loading
Get's the major and minor device binding revisions for Steam Input API configurations. Minor revisions are for small changes such as adding a new option action or updating localization in the configuration. When updating a Minor revision only one new configuration needs to be update with the "Use Action Block" flag set. Major revisions are to be used when changing the number of action sets or otherwise reworking configurations to the degree that older configurations are no longer usable. When a user's binding disagree's with the major revision of the current official configuration Steam will forcibly update the user to the new configuration. New configurations will need to be made for every controller when updating the Major revision.
Example Code:int nMinor = -1;
int nMinor = -1;
const int nCurrentMajorRevision = 1;
const int nCurrentMinorRevision = 1;
if ( GetControllerBindingRevision( controllerHandle, &nMajor, &nMinor ) )
{
if ( nMinorRevision != nCurrentMinorRevision )
{
// The minor version out of date, but that's ok
// next time they edit their config this will get fixed
}
if ( nMajorRevision != nCurrentMajorRevision )
{
// This should only happen briefly while Steam detects
// and then force-updates the user to the latest official config
}
}
else
{
// The configuration isn't loaded for this controller yet
}
Example In-game Action File Usage:"In Game Actions"
{
"major_revision" "0"
“minor_revision” “1”
"actions"
{
...
Structs
These are structs which functions in ISteamController may return and/or interact with.
ControllerAnalogActionData_t
Represents the current state of an analog action.
Notes: - The exact values, range, etc, depend on the configuration, but (broadly speaking) traditional analog actions will provide normalized float values in the ballpark of -1.0 to 1.0, whereas mouse-like actions will provide delta updates which indicate the number of "pixels" moved since the last frame. The upshot of this is that mouse-like actions will provide much larger absolute x and y values, and are relative to the last recorded input position, whereas traditional analog actions are smaller and relative to a central physical anchor point.
- While the delta provided by mouse-like actions is very similar to pixel deltas as provided by an OS, the SC deltas are floats, not ints. This means less potential quantization and loss of precision when mapping this data to a camera rotation.
- In the case of single-axis analog inputs (such as analog triggers), only the x axis will contain data; the y axis will always be zero.
Name | Tip | Description |
eMode | EControllerSourceMode | The type of data coming from this action, this will match what was specified in the action set's VDF definition. |
x | float | The current state of this action on the horizontal axis. |
y | float | The current state of this action vertical axis. |
bActive | bool | Whether or not this action is currently available to be bound in the active action set. If it is not available, OR does not belong to the active action set, this will be false. |
ControllerDigitalActionData_t
Represents the current state of a digital action.
Name | Tip | Description |
bState | bool | The current state of this action; true if the action is currently pressed, otherwise false. |
bActive | bool | Whether or not this action is currently available to be bound in the active action set. |
ControllerMotionData_t
Represents the current state of a device's motion sensor(s).
NOTE: For rotQuatX/rotQuatY/rotQuatZ, the inertial measurement unit on the controller will create a quaternion based on fusing the gyro and the accelerometer. This value is the absolute orientation of the controller, but it will drift on the yaw axis.
Name | Type | Description |
rotQuatX | float | Sensor-fused absolute rotation (will drift in heading), x axis |
rotQuatY | float | Sensor-fused absolute rotation (will drift in heading), y axis |
rotQuatZ | float | Sensor-fused absolute rotation (will drift in heading), z axis |
rotQuatW | float | Sensor-fused absolute rotation (will drift in heading), w axis |
posAccelX | float | Positional acceleration, x axis |
posAccelY | float | Positional acceleration, y axis |
posAccelZ | float | Positional acceleration, z axis |
rotVelX | float | Angular velocity, x axis |
rotVelY | float | Angular velocity, y axis |
rotVelZ | float | Angular velocity, z axis |
Enumerări
These are enums which are defined for use with ISteamController.
EControllerActionOrigin
Inputs the player binds to actions in the Steam Input Configurator. The chief purpose of these values is to direct which on-screen button glyphs should appear for a given action, such as "Press [A] to Jump".
Name | Value | Description |
k_EControllerActionOrigin_None | 0 | |
k_EControllerActionOrigin_A | 1 | (Valve Steam Controller) digital face button A |
k_EControllerActionOrigin_B | 2 | (Valve Steam Controller) digital face button B |
k_EControllerActionOrigin_X | 3 | (Valve Steam Controller) digital face button X |
k_EControllerActionOrigin_Y | 4 | (Valve Steam Controller) digital face button Y |
k_EControllerActionOrigin_LeftBumper | 5 | (Valve Steam Controller) digital left shoulder button (aka "left bumper") |
k_EControllerActionOrigin_RightBumper | 6 | (Valve Steam Controller) digital right shoulder button (aka "right bumper") |
k_EControllerActionOrigin_LeftGrip | 7 | (Valve Steam Controller) digital left grip paddle |
k_EControllerActionOrigin_RightGrip | 8 | (Valve Steam Controller) digital right grip paddle |
k_EControllerActionOrigin_Start | 9 | (Valve Steam Controller) digital start button |
k_EControllerActionOrigin_Back | 10 | (Valve Steam Controller) digital back button |
k_EControllerActionOrigin_LeftPad_Touch | 11 | (Valve Steam Controller) left haptic touchpad, in simple contact with a finger |
k_EControllerActionOrigin_LeftPad_Swipe | 12 | (Valve Steam Controller) left haptic touchpad, touch input on any axis |
k_EControllerActionOrigin_LeftPad_Click | 13 | (Valve Steam Controller) left haptic touchpad, digital click (for the whole thing) |
k_EControllerActionOrigin_LeftPad_DPadNorth | 14 | (Valve Steam Controller) left haptic touchpad, digital click (upper quadrant) |
k_EControllerActionOrigin_LeftPad_DPadSouth | 15 | (Valve Steam Controller) left haptic touchpad, digital click (lower quadrant) |
k_EControllerActionOrigin_LeftPad_DPadWest | 16 | (Valve Steam Controller) left haptic touchpad, digital click (left quadrant) |
k_EControllerActionOrigin_LeftPad_DPadEast | 17 | (Valve Steam Controller) left haptic touchpad, digital click (right quadrant) |
k_EControllerActionOrigin_RightPad_Touch | 18 | (Valve Steam Controller) right haptic touchpad, in simple contact with a finger |
k_EControllerActionOrigin_RightPad_Swipe | 19 | (Valve Steam Controller) right haptic touchpad, touch input on any axis |
k_EControllerActionOrigin_RightPad_Click | 20 | (Valve Steam Controller) right haptic touchpad, digital click (for the whole thing) |
k_EControllerActionOrigin_RightPad_DPadNorth | 21 | (Valve Steam Controller) right haptic touchpad, digital click (upper quadrant) |
k_EControllerActionOrigin_RightPad_DPadSouth | 22 | (Valve Steam Controller) right haptic touchpad, digital click (lower quadrant) |
k_EControllerActionOrigin_RightPad_DPadWest | 23 | (Valve Steam Controller) right haptic touchpad, digital click (left quadrant) |
k_EControllerActionOrigin_RightPad_DPadEast | 24 | (Valve Steam Controller) right haptic touchpad, digital click (right quadrant) |
k_EControllerActionOrigin_LeftTrigger_Pull | 25 | (Valve Steam Controller) left analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_LeftTrigger_Click | 26 | (Valve Steam Controller) left analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_RightTrigger_Pull | 27 | (Valve Steam Controller) right analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_RightTrigger_Click | 28 | (Valve Steam Controller) right analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_LeftStick_Move | 29 | (Valve Steam Controller) left joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_LeftStick_Click | 30 | (Valve Steam Controller) left joystick, clicked in (digital value) |
k_EControllerActionOrigin_LeftStick_DPadNorth | 31 | (Valve Steam Controller) left joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_LeftStick_DPadSouth | 32 | (Valve Steam Controller) left joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_LeftStick_DPadWest | 33 | (Valve Steam Controller) left joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_LeftStick_DPadEast | 34 | (Valve Steam Controller) left joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_Gyro_Move | 35 | (Valve Steam Controller) gyroscope, analog movement in any axis |
k_EControllerActionOrigin_Gyro_Pitch | 36 | (Valve Steam Controller) gyroscope, analog movement on the Pitch axis (point head up to ceiling, point head down to floor) |
k_EControllerActionOrigin_Gyro_Yaw | 37 | (Valve Steam Controller) gyroscope, analog movement on the Yaw axis (turn head left to face one wall, turn head right to face other) |
k_EControllerActionOrigin_Gyro_Roll | 38 | (Valve Steam Controller) gyroscope, analog movement on the Roll axis (tilt head left towards shoulder, tilt head right towards other) |
k_EControllerActionOrigin_PS4_X | 39 | (Sony Dualshock 4) digital face button X |
k_EControllerActionOrigin_PS4_Circle | 40 | (Sony Dualshock 4) digital face button Circle |
k_EControllerActionOrigin_PS4_Triangle | 41 | (Sony Dualshock 4) digital face button Triangle |
k_EControllerActionOrigin_PS4_Square | 42 | (Sony Dualshock 4) digital face button Square |
k_EControllerActionOrigin_PS4_LeftBumper | 43 | (Sony Dualshock 4) digital left shoulder button (aka "left bumper") |
k_EControllerActionOrigin_PS4_RightBumper | 44 | (Sony Dualshock 4) digital right shoulder button (aka "right bumper") |
k_EControllerActionOrigin_PS4_Options | 45 | (Sony Dualshock 4) digital options button (aka "Start") |
k_EControllerActionOrigin_PS4_Share | 46 | (Sony Dualshock 4) digital share button (aka "Back") |
k_EControllerActionOrigin_PS4_LeftPad_Touch | 47 | (Sony Dualshock 4) left half of the touchpad, in simple contact with a finger |
k_EControllerActionOrigin_PS4_LeftPad_Swipe | 48 | (Sony Dualshock 4) left half of the touchpad, touch input on any axis |
k_EControllerActionOrigin_PS4_LeftPad_Click | 49 | (Sony Dualshock 4) left half of the touchpad, digital click (for the whole thing) |
k_EControllerActionOrigin_PS4_LeftPad_DPadNorth | 50 | (Sony Dualshock 4) left half of the touchpad, digital click (upper quadrant) |
k_EControllerActionOrigin_PS4_LeftPad_DPadSouth | 51 | (Sony Dualshock 4) left half of the touchpad, digital click (lower quadrant) |
k_EControllerActionOrigin_PS4_LeftPad_DPadWest | 52 | (Sony Dualshock 4) left half of the touchpad, digital click (left quadrant) |
k_EControllerActionOrigin_PS4_LeftPad_DPadEast | 53 | (Sony Dualshock 4) left half of the touchpad, digital click (right quadrant) |
k_EControllerActionOrigin_PS4_RightPad_Touch | 54 | (Sony Dualshock 4) right half of the touchpad, in simple contact with a finger |
k_EControllerActionOrigin_PS4_RightPad_Swipe | 55 | (Sony Dualshock 4) right half of the touchpad, touch input on any axis |
k_EControllerActionOrigin_PS4_RightPad_Click | 56 | (Sony Dualshock 4) right half of the touchpad, digital click (for the whole thing) |
k_EControllerActionOrigin_PS4_RightPad_DPadNorth | 57 | (Sony Dualshock 4) right half of the touchpad, digital click (upper quadrant) |
k_EControllerActionOrigin_PS4_RightPad_DPadSouth | 58 | (Sony Dualshock 4) right half of the touchpad, digital click (lower quadrant) |
k_EControllerActionOrigin_PS4_RightPad_DPadWest | 59 | (Sony Dualshock 4) right half of the touchpad, digital click (left quadrant) |
k_EControllerActionOrigin_PS4_RightPad_DPadEast | 60 | (Sony Dualshock 4) right half of the touchpad, digital click (right quadrant) |
k_EControllerActionOrigin_PS4_CenterPad_Touch | 61 | (Sony Dualshock 4) unified touchpad, in simple contact with a finger |
k_EControllerActionOrigin_PS4_CenterPad_Swipe | 62 | (Sony Dualshock 4) unified touchpad, touch input on any axis |
k_EControllerActionOrigin_PS4_CenterPad_Click | 63 | (Sony Dualshock 4) unified touchpad, digital click (for the whole thing) |
k_EControllerActionOrigin_PS4_CenterPad_DPadNorth | 64 | (Sony Dualshock 4) unified touchpad, digital click (upper quadrant) |
k_EControllerActionOrigin_PS4_CenterPad_DPadSouth | 65 | (Sony Dualshock 4) unified touchpad, digital click (lower quadrant) |
k_EControllerActionOrigin_PS4_CenterPad_DPadWest | 66 | (Sony Dualshock 4) unified touchpad, digital click (left quadrant) |
k_EControllerActionOrigin_PS4_CenterPad_DPadEast | 67 | (Sony Dualshock 4) unified touchpad, digital click (right quadrant) |
k_EControllerActionOrigin_PS4_LeftTrigger_Pull | 68 | (Sony Dualshock 4) left analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_PS4_LeftTrigger_Click | 69 | (Sony Dualshock 4) left analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_PS4_RightTrigger_Pull | 70 | (Sony Dualshock 4) right analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_PS4_RightTrigger_Click | 71 | (Sony Dualshock 4) right analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_PS4_LeftStick_Move | 72 | (Sony Dualshock 4) left joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_PS4_LeftStick_Click | 73 | (Sony Dualshock 4) left joystick, clicked in (digital value) |
k_EControllerActionOrigin_PS4_LeftStick_DPadNorth | 74 | (Sony Dualshock 4) left joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_PS4_LeftStick_DPadSouth | 75 | (Sony Dualshock 4) left joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_PS4_LeftStick_DPadWest | 76 | (Sony Dualshock 4) left joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_PS4_LeftStick_DPadEast | 77 | (Sony Dualshock 4) left joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_PS4_RightStick_Move | 78 | (Sony Dualshock 4) right joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_PS4_RightStick_Click | 79 | (Sony Dualshock 4) right joystick, clicked in (digital value) |
k_EControllerActionOrigin_PS4_RightStick_DPadNorth | 80 | (Sony Dualshock 4) right joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_PS4_RightStick_DPadSouth | 81 | (Sony Dualshock 4) right joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_PS4_RightStick_DPadWest | 82 | (Sony Dualshock 4) right joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_PS4_RightStick_DPadEast | 83 | (Sony Dualshock 4) right joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_PS4_DPad_North | 84 | (Sony Dualshock 4) digital pad, pressed (upper quadrant) |
k_EControllerActionOrigin_PS4_DPad_South | 85 | (Sony Dualshock 4) digital pad, pressed (lower quadrant) |
k_EControllerActionOrigin_PS4_DPad_West | 86 | (Sony Dualshock 4) digital pad, pressed (left quadrant) |
k_EControllerActionOrigin_PS4_DPad_East | 87 | (Sony Dualshock 4) digital pad, pressed (right quadrant) |
k_EControllerActionOrigin_PS4_Gyro_Move | 88 | (Sony Dualshock 4) gyroscope, analog movement in any axis |
k_EControllerActionOrigin_PS4_Gyro_Pitch | 89 | (Sony Dualshock 4) gyroscope, analog movement on the Pitch axis (point head up to ceiling, point head down to floor) |
k_EControllerActionOrigin_PS4_Gyro_Yaw | 90 | (Sony Dualshock 4) gyroscope, analog movement on the Yaw axis (turn head left to face one wall, turn head right to face other) |
k_EControllerActionOrigin_PS4_Gyro_Roll | 91 | (Sony Dualshock 4) gyroscope, analog movement on the Roll axis (tilt head left towards shoulder, tilt head right towards other shoulder) |
k_EControllerActionOrigin_XBoxOne_A | 92 | (XB1) digital face button A |
k_EControllerActionOrigin_XBoxOne_B | 93 | (XB1) digital face button B |
k_EControllerActionOrigin_XBoxOne_X | 94 | (XB1) digital face button X |
k_EControllerActionOrigin_XBoxOne_Y | 95 | (XB1) digital face button Y |
k_EControllerActionOrigin_XBoxOne_LeftBumper | 96 | (XB1) digital left shoulder button (aka "left bumper") |
k_EControllerActionOrigin_XBoxOne_RightBumper | 97 | (XB1) digital right shoulder button (aka "right bumper") |
k_EControllerActionOrigin_XBoxOne_View | 99 | (XB1) digital view button (aka "back") |
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull | 100 | (XB1) left analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click | 101 | (XB1) left analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull | 102 | (XB1) right analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_XBoxOne_RightTrigger_Click | 103 | (XB1) right analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_XBoxOne_LeftStick_Move | 104 | (XB1) left joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_XBoxOne_LeftStick_Click | 105 | (XB1) left joystick, clicked in (digital value) |
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth | 106 | (XB1) left joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth | 107 | (XB1) left joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest | 108 | (XB1) left joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast | 109 | (XB1) left joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_XBoxOne_RightStick_Move | 110 | (XB1) right joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_XBoxOne_RightStick_Click | 111 | (XB1) right joystick, clicked in (digital value) |
k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth | 112 | (XB1) right joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth | 113 | (XB1) right joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest | 114 | (XB1) right joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast | 115 | (XB1) right joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_XBoxOne_DPad_North | 116 | (XB1) digital pad, pressed (upper quadrant) |
k_EControllerActionOrigin_XBoxOne_DPad_South | 117 | (XB1) digital pad, pressed (lower quadrant) |
k_EControllerActionOrigin_XBoxOne_DPad_West | 118 | (XB1) digital pad, pressed (left quadrant) |
k_EControllerActionOrigin_XBoxOne_DPad_East | 119 | (XB1) digital pad, pressed (right quadrant) |
k_EControllerActionOrigin_XBox360_A | 120 | (X360) digital face button A |
k_EControllerActionOrigin_XBox360_B | 121 | (X360) digital face button B |
k_EControllerActionOrigin_XBox360_X | 122 | (X360) digital face button X |
k_EControllerActionOrigin_XBox360_Y | 123 | (X360) digital face button Y |
k_EControllerActionOrigin_XBox360_LeftBumper | 124 | (X360) digital left shoulder button (aka "left bumper") |
k_EControllerActionOrigin_XBox360_RightBumper | 125 | (X360) digital right shoulder button (aka "right bumper") |
k_EControllerActionOrigin_XBox360_Start | 126 | (X360) digital start button |
k_EControllerActionOrigin_XBox360_Back | 127 | (X360) digital back button |
k_EControllerActionOrigin_XBox360_LeftTrigger_Pull | 128 | (X360) left analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_XBox360_LeftTrigger_Click | 129 | (X360) left analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_XBox360_RightTrigger_Pull | 130 | (X360) right analog trigger, pulled by any amount (analog value) |
k_EControllerActionOrigin_XBox360_RightTrigger_Click | 131 | (X360) right analog trigger, pulled in all the way (digital value) |
k_EControllerActionOrigin_XBox360_LeftStick_Move | 132 | (X360) left joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_XBox360_LeftStick_Click | 133 | (X360) left joystick, clicked in (digital value) |
k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth | 134 | (X360) left joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth | 135 | (X360) left joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_XBox360_LeftStick_DPadWest | 136 | (X360) left joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_XBox360_LeftStick_DPadEast | 137 | (X360) left joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_XBox360_RightStick_Move | 138 | (X360) right joystick, movement on any axis (analog value) |
k_EControllerActionOrigin_XBox360_RightStick_Click | 139 | (X360) right joystick, clicked in (digital value) |
k_EControllerActionOrigin_XBox360_RightStick_DPadNorth | 140 | (X360) right joystick, digital movement (upper quadrant) |
k_EControllerActionOrigin_XBox360_RightStick_DPadSouth | 141 | (X360) right joystick, digital movement (lower quadrant) |
k_EControllerActionOrigin_XBox360_RightStick_DPadWest | 142 | (X360) right joystick, digital movement (left quadrant) |
k_EControllerActionOrigin_XBox360_RightStick_DPadEast | 143 | (X360) right joystick, digital movement (right quadrant) |
k_EControllerActionOrigin_XBox360_DPad_North | 144 | (X360) digital pad, pressed (upper quadrant) |
k_EControllerActionOrigin_XBox360_DPad_South | 145 | (X360) digital pad, pressed (lower quadrant) |
k_EControllerActionOrigin_XBox360_DPad_West | 146 | (X360) digital pad, pressed (left quadrant) |
k_EControllerActionOrigin_XBox360_DPad_East | 147 | (X360) digital pad, pressed (right quadrant) |
k_EControllerActionOrigin_Count | 196 | The number of values in this enum, useful for iterating. |
EControllerSource
A region of the controller that can be thought of as a larger abstract modular unit that one of many modes can be applied to and output meaningful data. For example, a joystick can be treated as either a single analog input, or broken up into four discrete digital forming a virtual DPAD. Likewise, the ABXY face buttons form a natural group that be treated as four independent buttons, or as components of a virtual DPAD, etc.
Name | Value | Description |
k_EControllerSource_None | 0 | No controller source. |
k_EControllerSource_LeftTrackpad | 1 | The left touchpad, or the left half of a central touchpad. |
k_EControllerSource_RightTrackpad | 2 | The right touchpad, or the right half of a central touchpad. |
k_EControllerSource_Joystick | 3 | The joystick, or if there is more than one joystick, the left joystick. |
k_EControllerSource_ABXY | 4 | The four main face buttons. |
k_EControllerSource_Switch | 5 | Switches/buttons on the controller that don't belong to any other specific source. This includes bumpers, start/select, and grips. This special case of misfits don't fit into the larger paradigm and thus get their own source of digital buttons and a corresponding mode that processes them. |
k_EControllerSource_LeftTrigger | 6 | The left analog trigger. |
k_EControllerSource_RightTrigger | 7 | The right analog trigger. |
k_EControllerSource_Gyro | 8 | The internal gyroscope. |
k_EControllerSource_CenterTrackpad | 9 | The central touchpad. (DS4 only) |
k_EControllerSource_RightJoystick | 10 | The right joystick. If there is only one joystick, this source is not used. |
k_EControllerSource_DPad | 11 | The digital pad. |
k_EControllerSource_Key | 12 | Keyboard key (for keyboards with scan codes). |
k_EControllerSource_Mouse | 13 | Traditional mouse |
k_EControllerSource_Count | 14 | The number of enums, useful for iterating. |
EControllerSourceMode
The virtual input mode imposed by the configurator upon a controller source. For instance, the configurator can make an analog joystick behave like a Dpad with four digital inputs; the EControllerSource would be k_EControllerSource_Joystick and the EControllerSourceMode would be k_EControllerSourceMode_Dpad. The mode also changes the input data received by any associated actions.
Name | Value | Description |
k_EControllerSourceMode_None | 0 | No input mode. |
k_EControllerSourceMode_Dpad | 1 | A digital pad -- four digital directional buttons fused together in a cross pattern, such that only one button from each axis can be pressed at any given time. |
k_EControllerSourceMode_Buttons | 2 | |
k_EControllerSourceMode_FourButtons | 3 | Four digital face buttons, any of which can be pressed simultaneously |
k_EControllerSourceMode_AbsoluteMouse | 4 | |
k_EControllerSourceMode_RelativeMouse | 5 | |
k_EControllerSourceMode_JoystickMove | 6 | |
k_EControllerSourceMode_JoystickMouse | 7 | |
k_EControllerSourceMode_JoystickCamera | 8 | |
k_EControllerSourceMode_ScrollWheel | 9 | |
k_EControllerSourceMode_Trigger | 10 | |
k_EControllerSourceMode_MouseJoystick | 12 | |
k_EControllerSourceMode_MouseRegion | 13 | |
k_EControllerSourceMode_SingleButton | 15 | |
k_EControllerSourceMode_Switches | 16 | |
ESteamControllerLEDFlag
Controls the color of a Steam Controller Device's LED (if the device indeed has one).
Notes:The VSC has an LED, but only its brightness will be affected (the color is always white).
The DS4's LED is the lightbar, whose color and brightness can both be configured.
Name | Valoare | Description |
k_ESteamControllerLEDFlag_SetColor | 0 | Set the color to the specified values |
k_ESteamControllerLEDFlag_RestoreUserDefault | 1 | Restore the color to default (out-of-game) settings |
ESteamInputType
Represents the device model for a given piece of hardware.
Name | Valoare | Descriere |
k_ESteamInputType_Unknown | 0 | Catch-all for unrecognized devices |
k_ESteamInputType_SteamController | 1 | Valve's Steam Controller |
k_ESteamInputType_XBox360Controller | 2 | Microsoft's XBox 360 Controller |
k_ESteamInputType_XBoxOneController | 3 | Microsoft's XBox One Controller |
k_ESteamInputType_GenericXInput | 4 | Any generic 3rd-party XInput device |
k_ESteamInputType_PS4Controller | 5 | Sony's Playstation 4 Controller |
k_ESteamInputType_AppleMFiController | 6 | Unused |
k_ESteamInputType_AndroidController | 7 | Unused |
k_ESteamInputType_SwitchJoyConPair | 8 | Unused |
k_ESteamInputType_SwitchJoyConSingle | 9 | Unused |
k_ESteamInputType_SwitchProController | 10 | Nintendo's Switch Pro Controller |
k_ESteamInputType_MobileTouch | 11 | Steam Link App's Mobile Touch Controller |
k_ESteamInputType_PS3Controller | 12 | Sony's Playstation 3 Controller or PS3/PS4 compatible fight stick |
k_ESteamInputType_Count | 13 | Current number of values returned |
k_ESteamInputType_MaximumPossibleValue | 255 | Maximum possible value returned |
ESteamControllerPad
A touchpad region on a Steam Controller Device.
Notes:On the VSC, the values correspond to the left & right haptic touchpads.
On the DS4, the values correspond to the left & right halves of the single, central touchpad.
Nume | Value | Descriere |
k_ESteamControllerPad_Left | 0 | The left touchpad region on a Steam Controller Device. Compatible models: VSC, DS4 |
k_ESteamControllerPad_Right | 1 | The right region on a Steam Controller Device. Compatible models: VSC, DS4 |
Typedef-uri
These are typedefs which are defined for use with ISteamController.
Nume | Tip de bază | Description |
ControllerActionSetHandle_t | uint64 | These handles are used to refer to a specific in-game action or action set All action handles should be queried during initialization for performance reasons |
ControllerAnalogActionHandle_t | uint64 | A handle to an analog action. This can be obtained from GetAnalogActionHandle. |
ControllerDigitalActionHandle_t | uint64 | A handle to a digital action. This can be obtained from GetDigitalActionHandle. |
ControllerHandle_t | uint64 | This handle will consistently identify a controller, even if it is disconnected and re-connected |
Constants
These are constants which are defined for use with ISteamController.
Name | Type | Value | Description |
STEAMCONTROLLER_INTERFACE_VERSION | const char * | "SteamController007" | |
STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS | int | UINT64_MAX | When sending an option to a specific controller handle, you can use this special value in the place of a handle to send the option to all controllers instead. |
STEAM_CONTROLLER_MAX_ANALOG_ACTIONS | int | 16 | The maximum number of analog actions that can be performed on each controller. |
STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA | float | 1.0f | The maximum value that can be reported by an analog action on any given axis. |
STEAM_CONTROLLER_MAX_COUNT | int | 16 | The maximum number of controllers that can be used simultaneously with the Steam Input Configurator. |
STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS | int | 128 | The maximum number of digital actions that can be performed on each controller. |
STEAM_CONTROLLER_MAX_ORIGINS | int | 8 | The maximum number of input origins that can be attached to a single action. |
STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA | float | -1.0f | The minimum value that can be reported by an analog action on any given axis. |