New enums
See original GitHub issueSteam now supports the Switch controller. But you need to extend the enums to get it working. The extensions to the enums are reported in the forums:
public enum EControllerActionOrigin : int {
...
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
// Switch - Pro or Joycons used as a single input device.
// This does not apply to a single joycon
k_EControllerActionOrigin_Switch_A,
k_EControllerActionOrigin_Switch_B,
k_EControllerActionOrigin_Switch_X,
k_EControllerActionOrigin_Switch_Y,
k_EControllerActionOrigin_Switch_LeftBumper,
k_EControllerActionOrigin_Switch_RightBumper,
k_EControllerActionOrigin_Switch_Plus, //Start
k_EControllerActionOrigin_Switch_Minus, //Back
k_EControllerActionOrigin_Switch_Capture,
k_EControllerActionOrigin_Switch_LeftTrigger_Pull,
k_EControllerActionOrigin_Switch_LeftTrigger_Click,
k_EControllerActionOrigin_Switch_RightTrigger_Pull,
k_EControllerActionOrigin_Switch_RightTrigger_Click,
k_EControllerActionOrigin_Switch_LeftStick_Move,
k_EControllerActionOrigin_Switch_LeftStick_Click,
k_EControllerActionOrigin_Switch_LeftStick_DPadNorth,
k_EControllerActionOrigin_Switch_LeftStick_DPadSouth,
k_EControllerActionOrigin_Switch_LeftStick_DPadWest,
k_EControllerActionOrigin_Switch_LeftStick_DPadEast,
k_EControllerActionOrigin_Switch_RightStick_Move,
k_EControllerActionOrigin_Switch_RightStick_Click,
k_EControllerActionOrigin_Switch_RightStick_DPadNorth,
k_EControllerActionOrigin_Switch_RightStick_DPadSouth,
k_EControllerActionOrigin_Switch_RightStick_DPadWest,
k_EControllerActionOrigin_Switch_RightStick_DPadEast,
k_EControllerActionOrigin_Switch_DPad_North,
k_EControllerActionOrigin_Switch_DPad_South,
k_EControllerActionOrigin_Switch_DPad_West,
k_EControllerActionOrigin_Switch_DPad_East,
k_EControllerActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon
k_EControllerActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon
// Switch JoyCon Specific
k_EControllerActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro
k_EControllerActionOrigin_Switch_LeftGyro_Move,
k_EControllerActionOrigin_Switch_LeftGyro_Pitch,
k_EControllerActionOrigin_Switch_LeftGyro_Yaw,
k_EControllerActionOrigin_Switch_LeftGyro_Roll,
k_EControllerActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button
k_EControllerActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button
k_EControllerActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
}
...
public enum ESteamInputType : int {
k_ESteamInputType_Unknown,
k_ESteamInputType_SteamController,
k_ESteamInputType_XBox360Controller,
k_ESteamInputType_XBoxOneController,
k_ESteamInputType_GenericXInput,
k_ESteamInputType_PS4Controller,
k_ESteamInputType_AppleMFiController,
k_ESteamInputType_AndroidController,
k_ESteamInputType_Reserved1,
k_ESteamInputType_Reserved2,
k_ESteamInputType_SwitchProController
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Enum Types - Learning the Java Language
An enum type is a special data type that enables for a variable to be a set of predefined constants. The variable must...
Read more >Java Enums
An enum is a special "class" that represents a group of constants (unchangeable variables, like final variables). To create an enum , use...
Read more >Instantiate enum class - java
Enums are for when you have a fixed set of related constants. Exactly one instance will be created for each enum constant. Share....
Read more >enum — Support for enumerations
The enum class being called. value. The name of the new Enum to create. names. The names/values of the members for the new...
Read more >enum in Java
A Java enumeration is a class type. Although we don't need to instantiate an enum using new, it has the same capabilities as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be updated as of 1.43!
The most up-to-date enum for the InputDevice is:
Notably,
k_ESteamInputType_GenericXInput
seems to be changed tok_ESteamInputType_GenericGamepad
for the next SDK version. I believe the reason for this (as far as my testing can show) is that actual Generic X Input devices are reported to be x360 devices. So, only actual DirectInput devices would report value4
(this also reflects my testing experience).It’s also noted that
k_ESteamInputType_AppleMFiController
andk_ESteamInputType_AndroidController
should be reported by Steam when Steam Link Touch is used, but thus far I’ve only ever received an11
report (which will bek_ESteamInputType_MobileTouch
), so probably best to either catch-all, or at least make sure to also capture value11
as a “generic Steam Link Touch device”