Steamworks

Steamworks 문서
ISteamInput 인터페이스

영어로 된 새 버전이 있습니다.

이 페이지의 한국어 버전이 게시된 이후에 영어 버전이 새롭게 업데이트되었습니다.
여기를 클릭하여 이 페이지의 영어 버전을 확인하세요.
Steam Input API는 Xbox, PlayStation, Nintendo Switch Pro 그리고 Steam Controller를 포함한 모든 주요 컨트롤러를 지원하는 유연한 동작 기반의 API입니다.

자세한 정보는 Steam Input 문서를 참고해 주세요.

멤버 함수

ISteamInput의 멤버 함수는 SteamInput() 전역 접근자를 통해 호출할 수 있습니다.

ActivateActionSet

void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
이름유형설명
inputHandleInputHandle_t동작 세트를 활성화하려는 컨트롤러의 핸들
actionSetHandleInputActionSetHandle_t활성화하려는 동작 세트의 핸들

특정 동작 세트(예: '메뉴', '걷기', 또는 '운전')를 사용하기 위해 컨트롤러를 재구성합니다.

이 함수는 부담이 적으며 안전하게 반복 호출할 수 있습니다. 모든 상태 전이에서 적용하는 것보다 상태 루프에서 반복적으로 호출하는 것이 더 쉬운 경우가 많습니다.

예시:
void updateStateLoop() { switch( currentState ) { case MENU: SteamInput()->ActivateActionSet( inputHandle1, menuSetHandle ); doMenuStuff(); break; case WALKING: SteamInput()->ActivateActionSet( inputHandle1, walkingSetHandle ); doWalkingStuff(); break; case DRIVING: SteamInput()->ActivateActionSet( inputHandle1, drivingSetHandle ); doDrivingStuff(); break; case FIGHTING: SteamInput()->ActivateActionSet( inputHandle1, fightingSetHandle ); doFightingStuff(); break; } }

모든 컨트롤러 활성화

하나의 장치보다는 모든 컨트롤러를 한번에 활성화해야 할 경우가 종종 있을 수 있습니다. 이런 경우 STEAM_INPUT_HANDLE_ALL_CONTROLLERS 상수를 컨트롤러 핸들로 사용하세요. 또한, 개별 컨트롤러 핸들을 호출하는 다른 모든 함수에서 해당 값을 사용할 수 있습니다.

예시:
void updateStateLoop() { switch( currentState ) { case MENU: SteamInput()->ActivateActionSet( STEAM_INPUT_HANDLE_ALL_CONTROLLERS, menuSetHandle ); doMenuStuff(); break; case WALKING: SteamInput()->ActivateActionSet( STEAM_INPUT_HANDLE_ALL_CONTROLLERS, walkingSetHandle ); doWalkingStuff(); break; case DRIVING: SteamInput()->ActivateActionSet( STEAM_INPUT_HANDLE_ALL_CONTROLLERS, drivingSetHandle ); doDrivingStuff(); break; case FIGHTING: SteamInput()->ActivateActionSet( STEAM_INPUT_HANDLE_ALL_CONTROLLERS, fightingSetHandle ); doFightingStuff(); break; } }

ActivateActionSetLayer

void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
이름유형설명
inputHandleInputHandle_t동작 세트 레이어를 활성화하려는 컨트롤러의 핸들
actionSetHandleInputActionSetHandle_t활성화하려는 동작 세트 레이어의 핸들

지정된 동작 세트 레이어를 사용하기 위해 컨트롤러를 재구성합니다.

자세한 내용과 상세한 실제 예시는 동작 세트 레이어 문서를 참고해 주세요.

예시:
SteamInput()->ActivateActionSetLayer( inputHandle1, myActionSetLayer );

DeactivateActionSetLayer

void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
이름유형설명
inputHandleInputHandle_t동작 세트 레이어를 비활성화하려는 컨트롤러의 핸들
actionSetHandleInputActionSetHandle_t비활성화하려는 동작 세트 레이어의 핸들

지정된 동작 세트 레이어의 사용을 중지하기 위해 컨트롤러를 재구성합니다.

예시:
SteamInput()->DeactivateActionSetLayer( inputHandle1, myActionSetLayer );

DeactivateAllActionSetLayers

void DeactivateAllActionSetLayers( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_t모든 동작 세트 레이어를 비활성화하려는 컨트롤러의 핸들

모든 동작 세트 레이어의 사용을 중지하기 위해 컨트롤러를 재구성합니다.

예시:
SteamInput()->DeactivateAllActionSetLayers( inputHandle1 );

GetActiveActionSetLayers

int GetActiveActionSetLayers( InputHandle_t inputHandle, InputActionSetHandle_t *handlesOut );
이름유형설명
inputHandleInputHandle_t활성화된 동작 세트 레이어를 가져오려는 컨트롤러의 핸들
handlesOutInputActionSetHandle_t*InputHandle_t의 STEAM_INPUT_MAX_COUNT 크기 배열로 지정되어야 함

지정된 컨트롤러 핸들에 대한 배열을 현재 활성화된 모든 동작 세트 레이어로 채웁니다.

예시:
InputActionSetHandle_t hActiveLayerHandles [STEAM_INPUT_MAX_ACTIVE_LAYERS]; SteamInput()->GetActiveActionSetLayers( controllerHandle, hActiveLayerHandles );

GetActionSetHandle

InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName );
이름유형설명
pszActionSetNameconst char *게임의 VDF 파일에 정의된 동작 세트의 문자열 식별자

동작 세트의 핸들을 검색합니다. 시작 시 이 작업을 한 번 수행하고 이후 모든 API 호출을 위해 핸들을 저장하는 것이 가장 좋습니다.

반환값: InputActionSetHandle_t
지정된 동작 세트의 핸들입니다.

예시:
InputActionSetHandle_t fightingSetHandle = SteamInput()->GetActionSetHandle( "fighting" );

GetAnalogActionData

InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
이름유형설명
inputHandleInputHandle_t쿼리하려는 컨트롤러의 핸들
analogActionHandleInputAnalogActionHandle_t쿼리하려는 아날로그 동작의 핸들

지정된 아날로그 게임 동작의 현재 상태를 반환합니다.

반환값: InputAnalogActionData_t
지정된 아날로그 동작의 현재 상태입니다.

예시:
InputAnalogActionData_t data = SteamInput()->GetAnalogActionData( controller1Handle, moveHandle );

GetAnalogActionHandle

InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName );
이름유형설명
pszActionNameconst char *게임의 VDF 파일에 정의된 아날로그 동작 세트의 문자열 식별자

지정된 아날로그 동작의 핸들을 가져옵니다.

참고: 이 함수는 동작 세트 핸들 매개변수를 사용하지 않습니다. 따라서 VDF 파일의 각 동작에는 반드시 고유한 문자열 식별자가 있어야 합니다. 즉, 두 가지 다른 동작 세트에서 '위로'라는 동작을 사용하면 이 함수는 둘 중 한 가지 동작의 핸들만을 반환하고 다른 동작의 핸들은 무시합니다.

반환값: InputAnalogActionHandle_t
지정된 아날로그 동작의 핸들입니다.

예시:
InputAnalogActionHandle_t moveHandle = SteamInput()->GetAnalogActionHandle( "move" );

GetAnalogActionOrigins

int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin *originsOut );
이름유형설명
inputHandleInputHandle_t쿼리하려는 컨트롤러의 핸들
actionSetHandleInputActionSetHandle_t쿼리하려는 동작 세트의 핸들
analogActionHandleInputAnalogActionHandle_t쿼리하려는 아날로그 동작의 핸들
originsOutEInputActionOrigin *EInputActionOrigin 핸들의 STEAM_INPUT_MAX_ORIGINS 크기의 배열

originsOut에 EInputActionOrigin 핸들을 입력하여 동작 세트 내 아날로그 동작의 원본을 가져옵니다. 동작에 맞는 프롬프트가 화면에 표시되도록 사용하세요.

반환값: int
originsOut에 지정된 숫자 원본입니다.

예시:
EInputActionOrigin *origins = new EInputActionOrigin[ STEAM_INPUT_MAX_ORIGINS ]; SteamInput()->GetAnalogActionOrigins( controller1Handle, walkingSetHandle, moveHandle, origins );

GetConnectedControllers

int GetConnectedControllers( InputHandle_t *handlesOut );
이름유형설명
handlesOutInputHandle_t *InputHandle_t의 STEAM_INPUT_MAX_COUNT 크기 배열로 지정되어야 함

handlesOut에 컨트롤러 핸들을 입력하여 연결된 컨트롤러를 열거합니다.

반환값: int
handlesOut에 작성된 핸들의 개수입니다.

예시:
InputHandle_t *inputHandles = new InputHandle_t[ STEAM_INPUT_MAX_COUNT ]; SteamInput()->GetConnectedControllers( inputHandles );

GetControllerForGamepadIndex

InputHandle_t GetControllerForGamepadIndex( int nIndex );
이름유형설명
nIndexint컨트롤러 핸들을 가져오려는 에뮬레이션된 게임패드의 인덱스

지정된 에뮬레이션 게임패드와 관련된 컨트롤러 핸들을 반환합니다. GetInputTypeForHandle과 함께 사용하여, Steam Input 게임패드 에뮬레이션을 사용하는 컨트롤러의 컨트롤러 유형을 파악할 수 있습니다.

반환값: InputHandle_t


예시:
// Replace with the XInput Slot you are querying for. 이 숫자는 0과 3 사이입니다. int nXinputSlotIndex = 0; InputHandle_t inputHandle = SteamInput()->GetControllerForGamepadIndex( nXinputSlotIndex ); if ( inputHandle == 0 ) { // 유효한 입력 핸들은 0이 아니며, 이는 일반적인 Xbox 컨트롤러입니다. } else { ESteamInputType inputType = SteamInput()->GetInputTypeForHandle( inputHandle ); switch( inputType ) { case k_ESteamInputType_Unknown: printf( "알 수 없음!\n" ); break; case k_ESteamInputType_SteamController: printf( "Steam Controller!\n" ); break; case k_ESteamInputType_XBox360Controller: printf( "XBox 360 컨트롤러!\n" ); break; case k_ESteamInputType_XBoxOneController: printf( "XBox One 컨트롤러!\n" ); break; case k_ESteamInputType_GenericXInput: printf( "일반 XInput!\n" ); break; case k_ESteamInputType_PS4Controller: printf( "PS4 컨트롤러!\n" ); break; } }

GetCurrentActionSet

InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_t쿼리하려는 컨트롤러의 핸들

지정된 컨트롤러에 대해 현재 활성화된 동작 세트를 가져옵니다.

반환값: InputActionSetHandle_t
지정된 컨트롤러에 대해 활성화된 동작 세트의 핸들입니다.

예시:
InputActionSetHandle_t controller1Set = SteamInput()->GetCurrentActionSet(controller1Handle);

GetDigitalActionData

InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
이름유형설명
inputHandleInputHandle_t쿼리하려는 컨트롤러의 핸들
digitalActionHandleInputDigitalActionHandle_t쿼리하려는 디지털 동작의 핸들

지정된 디지털 게임 동작의 현재 상태를 반환합니다.

반환값: InputDigitalActionData_t
지정된 디지털 동작의 현재 상태입니다.

GetDigitalActionHandle

InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName );
이름유형설명
pszActionNameconst char *게임의 VDF 파일에 정의된 디지털 동작 세트의 문자열 식별자

지정된 디지털 동작의 핸들을 가져옵니다.

참고: 이 함수는 동작 세트 핸들 매개변수를 사용하지 않습니다. 따라서 VDF 파일의 각 동작에는 반드시 고유한 문자열 식별자가 있어야 합니다. 즉, 두 가지 다른 동작 세트에서 '위로'라는 동작을 사용하면 이 함수는 둘 중 한 가지 동작의 핸들만을 반환하고 다른 동작의 핸들은 무시합니다.

반환값: InputDigitalActionHandle_t
지정된 디지털 동작의 핸들입니다.

예시:
InputDigitalActionHandle_t punchHandle = SteamInput()->GetDigitalActionHandle( "punch" );

GetDigitalActionOrigins

int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin *originsOut );
이름유형설명
inputHandleInputHandle_t쿼리하려는 컨트롤러의 핸들
actionSetHandleInputActionSetHandle_t쿼리하려는 동작 세트의 핸들
digitalActionHandleInputDigitalActionHandle_t쿼리하려는 디지털 동작의 핸들
originsOutEInputActionOrigin *EInputActionOrigin 핸들의 STEAM_INPUT_MAX_ORIGINS 크기 배열

originsOutEInputActionOrigin 핸들을 입력하여 동작 세트 내에서 디지털 동작의 원본을 가져올 수 있습니다. 동작에 맞는 프롬프트가 화면에 표시되도록 사용하세요.

반환값: int
originsOut에 지정된 숫자 원본입니다.

예시:
EInputActionOrigin *origins = new EInputActionOrigin[ STEAM_INPUT_MAX_ORIGINS ]; SteamInput()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins );

GetGamepadIndexForController

int GetGamepadIndexForController( InputHandle_t ulControllerHandle );
이름유형설명
ulControllerHandleInputHandle_t게임패드 인덱스를 불러오려는 컨트롤러의 핸들

게임패드를 에뮬레이션하는 경우, 지정된 컨트롤러에 관련된 게임패드 인덱스를 반환합니다.

반환값: int


예시:
int gamepadIndex = SteamInput()->GetGamepadIndexForController( controller1Handle );

GetGlyphForActionOrigin

const char * GetGlyphForActionOrigin( EInputActionOrigin eOrigin );
이름유형설명
eOriginEInputActionOrigin

특정 소스의 화면 상의 버튼 아이콘 아트에 대한 로컬 경로를 가져옵니다.

반환값: const char *
버튼 아이콘의 png 파일에 대한 경로
예, "C:\Program Files (x86)\Steam\tenfoot\resource\images\library\controller\api\ps4_button_x.png"

예시:
// Gets origins for "punch" EInputActionOrigin *origins = new EInputActionOrigin[ STEAM_INPUT_MAX_ORIGINS ]; SteamInput()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins ); EInputActionOrigin firstOrigin = origins[0]; //i.e, k_EInputActionOrigin_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! Steam에서 새 컨트롤러에 대한 지원을 추가했거나 // 이 아트를 잊고 있었을 수도 있습니다! //(예: Steam Controller 버튼 아이콘만 사용하지만 PlayStation 4 컨트롤러일 경우) if( glyphTextureID == -1 ) { // Steam 클라이언트에서 이미지를 대신 가져옵니다. const char *localGlyphPath = SteamInput()->GetGlyphForActionOrigin( firstOrigin ); printf( "path = %s\n", localGlyphPath ); // "path = C:\Program Files (x86)\Steam\tenfoot\resource\images\library\controller\api\ps4_button_x.png" //파일 경로를 사용 가능한 게임 텍스처로 변경하는 게임 자체의 함수입니다. glyphTextureID = loadButtonGlyphTextureFromLocalPath( localGlyphPath ); }

GetInputTypeForHandle

ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_t쿼리하려는 입력 유형(기기 모델)의 컨트롤러 핸들

지정된 컨트롤러에 대한 입력 유형(기기 모델)을 반환합니다. 이를 통해 특정 컨트롤러가 Steam Controller, Xbox 360 컨트롤러, PS4 컨트롤러 등 어떤 컨트롤러인지 알 수 있습니다.

반환값: ESteamInputType


예시:
ESteamInputType inputType = SteamInput()->GetInputTypeForHandle(controller1Handle); switch(inputType) { case k_ESteamInputType_Unknown: printf("알 수 없음!\n"); break; case k_ESteamInputType_SteamController: printf("Steam Controller!\n"); break; case k_ESteamInputType_XBox360Controller: printf("XBox 360 컨트롤러!\n"); break; case k_ESteamInputType_XBoxOneController: printf("XBox One 컨트롤러!\n"); break; case k_ESteamInputType_GenericXInput: printf("일반 XInput!\n"); break; case k_ESteamInputType_PS4Controller: printf("PS4 컨트롤러!\n"); break; }

GetMotionData

InputMotionData_t GetMotionData( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_t모션 데이터를 불러오려는 컨트롤러의 핸들

지정된 컨트롤러에 대한 원시 모션 데이터를 반환합니다.

반환값: InputMotionData_t


예시:
InputMotionData_t motionData = SteamInput()->GetControllerMotionData( inputHandle );

GetStringForActionOrigin

const char * GetStringForActionOrigin( EInputActionOrigin eOrigin );
이름유형설명
eOriginEInputActionOrigin

지정된 원본을 위해 Steam의 언어 설정에서 지역된 문자열을 반환합니다.

반환값: const char *


예시:
EInputActionOrigin *origins = new EInputActionOrigin[ STEAM_INPUT_MAX_ORIGINS ]; SteamInput()->GetDigitalActionOrigins( controller1Handle, fightingSetHandle, punchHandle, origins ); const char * punchString = SteamInput()->GetStringForActionOrigin( origins[0] ); printf("punch = %s\n",punchString);

Init

bool Init();
ISteamInput 인터페이스 사용 시작 시 호출되어야 합니다.

반환값: bool
항상 true를 반환합니다.

예시:
SteamInput()->Init();

RunFrame

void RunFrame();
사용 가능한 최신 Steam Controller 입력과 함께 API 상태를 동기화합니다. 이 함수는 SteamAPI_RunCallbacks에 의해 자동으로 실행되지만 절대적으로 짧은 지연 시간을 위해서는 컨트롤러의 상태를 확인하기 전에 직접 호출할 수 있습니다.

예시:
SteamInput()->RunFrame();

SetDualSenseTriggerEffect

void SetDualSenseTriggerEffect( InputHandle_t inputHandle, const ScePadTriggerEffectParam *pParam );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들
pParam ScePadTriggerEffectParamThe trigger parameter, defined in isteamdualsense.h

Set the trigger effect for a DualSense controller.

Example:
ScePadTriggerEffectParam param; memset( &param, 0, sizeof( param ) ); param.triggerMask = SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_R2; param.command[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2].mode = SCE_PAD_TRIGGER_EFFECT_MODE_VIBRATION; param.command[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2].commandData.vibrationParam.position = 5; param.command[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2].commandData.vibrationParam.amplitude = 5; param.command[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2].commandData.vibrationParam.frequency = 8; SteamInput()->SetDualSenseTriggerEffect( controller1Handle, &param );

SetLEDColor

void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags );
이름유형설명
inputHandleInputHandle_tThe handle of the controller to affect.
nColorRuint8The red component of the color to set (0-255).
nColorGuint8The green component of the color to set (0-255).
nColorBuint8The blue component of the color to set (0-255).
nFlagsunsigned intBit-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: SteamInput()->SetLEDColor( controller1Handle, 0, 0, 0, k_ESteamControllerLEDFlag_RestoreUserDefault ); // Set the color to magenta for controller 2: SteamInput()->SetLEDColor( controller2Handle, 255, 0, 255, k_ESteamControllerLEDFlag_SetColor );

ShowAnalogActionOrigins

bool ShowAnalogActionOrigins( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition );
이름유형설명
inputHandleInputHandle_t
analogActionHandleInputAnalogActionHandle_t
flScalefloat
flXPositionfloat
flYPositionfloat

Deprecated.

Returns: bool
Always returns true.

ShowBindingPanel

bool ShowBindingPanel( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_tThe handle of the controller you want to bring up the binding screen for.

Invokes the Steam overlay and brings up the binding screen.

Returns: bool
true for success; false if overlay is disabled/unavailable. If the player is using Big Picture Mode the configuration will open in the overlay. In desktop mode a popup window version of Big Picture will be created and open the configuration.

Example:
SteamInput()->ShowBindingPanel( myControllerHandle );

ShowDigitalActionOrigins

bool ShowDigitalActionOrigins( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition );
이름유형설명
inputHandleInputHandle_t
digitalActionHandleInputDigitalActionHandle_t
flScalefloat
flXPositionfloat
flYPositionfloat

Deprecated.

반환값: bool
항상 true를 반환합니다.

Shutdown

bool Shutdown();
Must be called when ending use of the ISteamInput interface.

Returns: bool
Always returns true.

Example:
SteamInput()->Shutdown();

StopAnalogActionMomentum

void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들
eActionInputAnalogActionHandle_tThe analog action to stop momentum for.

Stops the momentum of an analog action (where applicable, i.e. 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:
SteamInput()->StopAnalogActionMomentum( controller1Handle, moveHandle );

TriggerHapticPulse

void TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들
eTargetPadESteamControllerPadWhich haptic touchpad to affect.
usDurationMicroSecunsigned shortDuration 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 SteamInput()->TriggerHapticPulse(controller1Handle, k_ESteamControllerPad_Left, 50000);

TriggerRepeatedHapticPulse

void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들
eTargetPadESteamControllerPadWhich haptic touchpad to affect.
usDurationMicroSecunsigned shortDuration of the pulse, in microseconds (1/1,000,000th of a second).
usOffMicroSecunsigned shortDuration of the pause between pulses, in microseconds.
unRepeatunsigned shortNumber of times to repeat the usDurationMicroSec / usOffMicroSec duty cycle.
nFlagsunsigned intCurrently unused and reserved for future use.

Triggers a repeated haptic pulse on supported controllers.

Notes:
Currently only the Steam Controller, Steam Deck, and Nintendo Switch Pro Controller devices support 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 SteamInput()->TriggerRepeatedHapticPulse( controller1Handle, k_ESteamControllerPad_Left, 50000, 50000, 10 );

TriggerVibration

void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
이름유형설명
inputHandleInputHandle_tThe handle of the controller to affect.
usLeftSpeedunsigned shortThe intensity value for the left rumble motor.
usRightSpeedunsigned shortThe 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:
SteamInput()->TriggerVibration( controller1Handle, 10000, 10000 );

TriggerVibrationExtended

void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들
usLeftSpeedunsigned shortThe intensity value for the left rumble motor.
usRightSpeedunsigned shortThe intensity value of the right rumble motor.
usLeftTriggerSpeedunsigned shortThe intensity value for the left Xbox Impulse Trigger motor.
usRightTriggerSpeedunsigned shortThe intensity value of the right Xbox Impulse Trigger motor.

Trigger a vibration event on supported controllers, including Xbox Impulse Trigger motor values.

Notes:
On Windows support for Xbox Impulse Trigger motor values requires user installation of the Xbox Extended Feature support driver.
The Steam Controller and Steam Deck will emulate traditional rumble using their haptics.

Example:
SteamInput()->TriggerVibrationExtended( controller1Handle, 10000, 10000, 10000, 10000 );

GetActionOriginFromXboxOrigin

EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin );
이름유형설명
inputHandleInputHandle_tThe handle of the controller to affect. You can use GetControllerForGamepadIndex to get this handle
eOriginEXboxOriginThis is the button you want to get the image for ex: k_EXboxOrigin_A

Returns: EInputActionOrigin

Get an action origin that you can use in your glyph look up table or passed into GetGlyphForActionOrigin or GetStringForActionOrigin


Example:
int nXinputSlot = 1; // Substitute whatever the correct Xinput slot is for your player InputHandle_t controller1Handle = GetControllerForGamepadIndex( nXinputSlot ); EInputActionOrigin buttonOrigin = SteamInput()->GetActionOriginFromXboxOrigin( controller1Handle, k_EXboxOrigin_A ); // Gets the image from the Steam client . const char *localGlyphPath = SteamInput()->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

EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin );
이름유형설명
inputHandleInputHandle_t적용하려는 컨트롤러의 핸들 You can use GetControllerForGamepadIndex to get this handle
eDestinationInputTypeESteamInputTypeThe controller type you want to translate to. Steam will pick the closest type from your SDK version if k_ESteamInputType_Unknown is used
eSourceOriginEInputActionOriginThis is the button you want to translate

Returns: EInputActionOrigin

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


Example:
int nXinputSlot = 1; // Substitutes whatever the correct Xinput slot is for your player InputHandle_t controller1Handle = GetControllerForGamepadIndex( nXinputSlot ); EInputActionOrigin buttonOrigin = SteamInput()->GetActionOriginFromXboxOrigin( controller1Handle, k_EXboxOrigin_A ); //i.e, k_EInputActionOrigin_PS4_X if ( buttonOrigin >= k_EInputActionOrigin_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 = SteamInput()->TranslateActionOrigin( k_ESteamInputType_Unknown, buttonOrigin ) } // This is a function from the game itself that tries to get custom glyph art int glyphTextureID = getHardCodedButtonGlyphTexture( actionOrigin );

GetDeviceBindingRevision

bool GetDeviceBindingRevision( InputHandle_t inputHandle, int *pMajor, int *pMinor );
이름유형설명
inputHandleInputHandle_tThe handle of the controller to query.
pMajorint * Pointer to int that Major binding revision will be populated into
pMinorint * Pointer to int that Minor binding revision will be populated into

Returns: bool - true if a device binding was successfully found and false if the binding is still loading.

Gets the major and minor device binding revisions for Steam Input API configurations. 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 disagrees 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. Minor revisions are for small changes such as adding a new optional action or updating localization in the configuration. When updating the minor revision you generally can update a single configuration and check the "Use Action Block" to apply the action block changes to the other configurations.

Example Code:
int nMajorRevision = -1; int nMinorRevision= -1; const int nCurrentMajorRevision = 1; const int nCurrentMinorRevision = 1; if ( GetDeviceBindingRevision( inputHandle, &nMajorRevision , &nMinorRevision ) ) { 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" { ...

GetRemotePlaySessionID

uint32 GetRemotePlaySessionID( InputHandle_t inputHandle );
이름유형설명
inputHandleInputHandle_tThe handle of the controller to query.

Returns: uint32 - Steam Remote Play session ID

Get the Steam Remote Play session ID associated with a device, or 0 if there is no session associated with it. See isteamremoteplay.h for more information on Steam Remote Play sessions.

구조체

These are structs which functions in ISteamInput may return and/or interact with.

InputAnalogActionData_t

Represents the current state of an analog action.

Notes:
  • 정확한 값, 범위 등은 구성에 따라 달라지지만, 대체적으로 일반 아날로그 동작은 대략 -1.0과 1.0 사이의 정규화된 부동 소수점 값을 제공하며, 마우스와 유사한 동작은 마지막 프레임 이후 이동된 '픽셀' 수를 나타내는 델타 업데이트를 제공합니다. 결과적으로, 마우스와 유사한 동작은 훨씬 큰 절대 x와 y값을 제공하고 마지막으로 기록된 입력 위치를 기준으로 값을 제공하는 반면, 기존의 아날로그 동작은 중앙의 물리적인 앵커 포인트를 기준으로 하여 더 작은 값을 제공합니다.
  • 마우스 유사 동작에서 제공되는 델타는 OS에서 제공되는 픽셀 델타와 매우 유사하지만, SC 델타가 int가 아닌 float입니다. 즉, 이 데이터를 카메라 회전에 맵핑할 때 양자화가 덜하고 정밀도 손실이 있을 수 있습니다.
  • 아날로그 트리거와 같은 단일 축 아날로그 입력의 경우, x축에만 데이터가 포함되며 y축은 항상 0입니다.

이름유형설명
eModeEControllerSourceModeThe type of data coming from this action, this will match what was specified in the action set's VDF definition.
xfloatThe current state of this action on the horizontal axis.
yfloatThe current state of this action vertical axis.
bActiveboolWhether 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.

InputDigitalActionData_t

Represents the current state of a digital action.

이름Type설명
bStateboolThe current state of this action; true if the action is currently pressed, otherwise false.
bActiveboolWhether or not this action is currently available to be bound in the active action set.

InputMotionData_t

Represents the current state of a device's motion sensor(s).

NOTE: For rotQuatX/rotQuatY/rotQuatZ/rotQuatW, 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.

위치 가속도는 중력의 범위가 ±2G(1G=9.80665 m/s2) 범위로 고정되었을 떄 INT16_MIN과 INT16_MAX 사이의 보간값으로 보고됩니다.

각속도는 범위가 초당 ±2000도 범위로 고정되었을 때 INT16_MIN과 INT16_MAX 사이의 보간값으로 보고됩니다.

이름Type설명
rotQuatXfloatSensor-fused absolute rotation (will drift in heading), x axis
rotQuatYfloatSensor-fused absolute rotation (will drift in heading), y axis
rotQuatZfloatSensor-fused absolute rotation (will drift in heading), z axis
rotQuatWfloatSensor-fused absolute rotation (will drift in heading), w axis
posAccelXfloatPositional acceleration, x axis
posAccelYfloatPositional acceleration, y axis
posAccelZfloatPositional acceleration, z axis
rotVelXfloatAngular velocity, x axis
rotVelYfloatAngular velocity, y axis
rotVelZfloatAngular velocity, z axis

열거형

These are enums which are defined for use with ISteamInput.

EInputActionOrigin

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".

이름설명
k_EInputActionOrigin_None0
k_EInputActionOrigin_A1(Valve Steam Controller) digital face button A
k_EInputActionOrigin_B2(Valve Steam Controller) digital face button B
k_EInputActionOrigin_X3(Valve Steam Controller) digital face button X
k_EInputActionOrigin_Y4(Valve Steam Controller) digital face button Y
k_EInputActionOrigin_LeftBumper5(Valve Steam Controller) digital left shoulder button (aka left bumper)
k_EInputActionOrigin_RightBumper6(Valve Steam Controller) digital right shoulder button (aka right bumper)
k_EInputActionOrigin_LeftGrip7(Valve Steam Controller) digital left grip paddle
k_EInputActionOrigin_RightGrip8(Valve Steam Controller) digital right grip paddle
k_EInputActionOrigin_Start9(Valve Steam Controller) digital start button
k_EInputActionOrigin_Back10(Valve Steam Controller) digital back button
k_EInputActionOrigin_LeftPad_Touch11(Valve Steam Controller) left haptic touchpad, in simple contact with a finger
k_EInputActionOrigin_LeftPad_Swipe12(Valve Steam Controller) left haptic touchpad, touch input on any axis
k_EInputActionOrigin_LeftPad_Click13(Valve Steam Controller) left haptic touchpad, digital click (for the whole thing)
k_EInputActionOrigin_LeftPad_DPadNorth14(Valve Steam Controller) left haptic touchpad, digital click (upper quadrant)
k_EInputActionOrigin_LeftPad_DPadSouth15(Valve Steam Controller) left haptic touchpad, digital click (lower quadrant)
k_EInputActionOrigin_LeftPad_DPadWest16(Valve Steam Controller) left haptic touchpad, digital click (left quadrant)
k_EInputActionOrigin_LeftPad_DPadEast17(Valve Steam Controller) left haptic touchpad, digital click (right quadrant)
k_EInputActionOrigin_RightPad_Touch18(Valve Steam Controller) right haptic touchpad, in simple contact with a finger
k_EInputActionOrigin_RightPad_Swipe19(Valve Steam Controller) right haptic touchpad, touch input on any axis
k_EInputActionOrigin_RightPad_Click20(Valve Steam Controller) right haptic touchpad, digital click (for the whole thing)
k_EInputActionOrigin_RightPad_DPadNorth21(Valve Steam Controller) right haptic touchpad, digital click (upper quadrant)
k_EInputActionOrigin_RightPad_DPadSouth22(Valve Steam Controller) right haptic touchpad, digital click (lower quadrant)
k_EInputActionOrigin_RightPad_DPadWest23(Valve Steam Controller) right haptic touchpad, digital click (left quadrant)
k_EInputActionOrigin_RightPad_DPadEast24(Valve Steam Controller) right haptic touchpad, digital click (right quadrant)
k_EInputActionOrigin_LeftTrigger_Pull25(Valve Steam Controller) left analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_LeftTrigger_Click26(Valve Steam Controller) left analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_RightTrigger_Pull27(Valve Steam Controller) right analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_RightTrigger_Click28(Valve Steam Controller) right analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_LeftStick_Move29(Valve Steam Controller) left joystick, movement on any axis (analog value)
k_EInputActionOrigin_LeftStick_Click30(Valve Steam Controller) left joystick, clicked in (digital value)
k_EInputActionOrigin_LeftStick_DPadNorth31(Valve Steam Controller) left joystick, digital movement (upper quadrant)
k_EInputActionOrigin_LeftStick_DPadSouth32(Valve Steam Controller) left joystick, digital movement (lower quadrant)
k_EInputActionOrigin_LeftStick_DPadWest33(Valve Steam Controller) left joystick, digital movement (left quadrant)
k_EInputActionOrigin_LeftStick_DPadEast34(Valve Steam Controller) left joystick, digital movement (right quadrant)
k_EInputActionOrigin_Gyro_Move35(Valve Steam Controller) gyroscope, analog movement in any axis
k_EInputActionOrigin_Gyro_Pitch36(Valve Steam Controller) gyroscope, analog movement on the Pitch axis (point head up to ceiling, point head down to floor)
k_EInputActionOrigin_Gyro_Yaw37(Valve Steam Controller) gyroscope, analog movement on the Yaw axis (turn head left to face one wall, turn head right to face other)
k_EInputActionOrigin_Gyro_Roll38(Valve Steam Controller) gyroscope, analog movement on the Roll axis (tilt head left towards shoulder, tilt head right towards other)
k_EInputActionOrigin_SteamController_Reserved039Reserved for future use
k_EInputActionOrigin_SteamController_Reserved140Reserved for future use
k_EInputActionOrigin_SteamController_Reserved241Reserved for future use
k_EInputActionOrigin_SteamController_Reserved342Reserved for future use
k_EInputActionOrigin_SteamController_Reserved443Reserved for future use
k_EInputActionOrigin_SteamController_Reserved544Reserved for future use
k_EInputActionOrigin_SteamController_Reserved645Reserved for future use
k_EInputActionOrigin_SteamController_Reserved746Reserved for future use
k_EInputActionOrigin_SteamController_Reserved847Reserved for future use
k_EInputActionOrigin_SteamController_Reserved948Reserved for future use
k_EInputActionOrigin_SteamController_Reserved1049Reserved for future use
k_EInputActionOrigin_PS4_X50(Sony Dualshock 4) digital face button X
k_EInputActionOrigin_PS4_Circle51(Sony Dualshock 4) digital face button Circle
k_EInputActionOrigin_PS4_Triangle52(Sony Dualshock 4) digital face button Triangle
k_EInputActionOrigin_PS4_Square53(Sony Dualshock 4) digital face button Square
k_EInputActionOrigin_PS4_LeftBumper54(Sony Dualshock 4) digital left shoulder button (aka left bumper)
k_EInputActionOrigin_PS4_RightBumper55(Sony Dualshock 4) digital right shoulder button (aka right bumper)
k_EInputActionOrigin_PS4_Options56(Sony Dualshock 4) digital options button (aka Start)
k_EInputActionOrigin_PS4_Share57(Sony Dualshock 4) digital share button (aka Back)
k_EInputActionOrigin_PS4_LeftPad_Touch58(Sony Dualshock 4) left half of the touchpad, in simple contact with a finger
k_EInputActionOrigin_PS4_LeftPad_Swipe59(Sony Dualshock 4) left half of the touchpad, touch input on any axis
k_EInputActionOrigin_PS4_LeftPad_Click60(Sony Dualshock 4) left half of the touchpad, digital click (for the whole thing)
k_EInputActionOrigin_PS4_LeftPad_DPadNorth61(Sony Dualshock 4) left half of the touchpad, digital click (upper quadrant)
k_EInputActionOrigin_PS4_LeftPad_DPadSouth62(Sony Dualshock 4) left half of the touchpad, digital click (lower quadrant)
k_EInputActionOrigin_PS4_LeftPad_DPadWest63(Sony Dualshock 4) left half of the touchpad, digital click (left quadrant)
k_EInputActionOrigin_PS4_LeftPad_DPadEast64(Sony Dualshock 4) left half of the touchpad, digital click (right quadrant)
k_EInputActionOrigin_PS4_RightPad_Touch65(Sony Dualshock 4) right half of the touchpad, in simple contact with a finger
k_EInputActionOrigin_PS4_RightPad_Swipe66(Sony Dualshock 4) right half of the touchpad, touch input on any axis
k_EInputActionOrigin_PS4_RightPad_Click67(Sony Dualshock 4) right half of the touchpad, digital click (for the whole thing)
k_EInputActionOrigin_PS4_RightPad_DPadNorth68(Sony Dualshock 4) right half of the touchpad, digital click (upper quadrant)
k_EInputActionOrigin_PS4_RightPad_DPadSouth69(Sony Dualshock 4) right half of the touchpad, digital click (lower quadrant)
k_EInputActionOrigin_PS4_RightPad_DPadWest70(Sony Dualshock 4) right half of the touchpad, digital click (left quadrant)
k_EInputActionOrigin_PS4_RightPad_DPadEast71(Sony Dualshock 4) right half of the touchpad, digital click (right quadrant)
k_EInputActionOrigin_PS4_CenterPad_Touch72(Sony Dualshock 4) unified touchpad, in simple contact with a finger
k_EInputActionOrigin_PS4_CenterPad_Swipe73(Sony Dualshock 4) unified touchpad, touch input on any axis
k_EInputActionOrigin_PS4_CenterPad_Click74(Sony Dualshock 4) unified touchpad, digital click (for the whole thing)
k_EInputActionOrigin_PS4_CenterPad_DPadNorth75(Sony Dualshock 4) unified touchpad, digital click (upper quadrant)
k_EInputActionOrigin_PS4_CenterPad_DPadSouth76(Sony Dualshock 4) unified touchpad, digital click (lower quadrant)
k_EInputActionOrigin_PS4_CenterPad_DPadWest77(Sony Dualshock 4) unified touchpad, digital click (left quadrant)
k_EInputActionOrigin_PS4_CenterPad_DPadEast78(Sony Dualshock 4) unified touchpad, digital click (right quadrant)
k_EInputActionOrigin_PS4_LeftTrigger_Pull79(Sony Dualshock 4) left analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_PS4_LeftTrigger_Click80(Sony Dualshock 4) left analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_PS4_RightTrigger_Pull81(Sony Dualshock 4) right analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_PS4_RightTrigger_Click82(Sony Dualshock 4) right analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_PS4_LeftStick_Move83(Sony Dualshock 4) left joystick, movement on any axis (analog value)
k_EInputActionOrigin_PS4_LeftStick_Click84(Sony Dualshock 4) left joystick, clicked in (digital value)
k_EInputActionOrigin_PS4_LeftStick_DPadNorth85(Sony Dualshock 4) left joystick, digital movement (upper quadrant)
k_EInputActionOrigin_PS4_LeftStick_DPadSouth86(Sony Dualshock 4) left joystick, digital movement (lower quadrant)
k_EInputActionOrigin_PS4_LeftStick_DPadWest87(Sony Dualshock 4) left joystick, digital movement (left quadrant)
k_EInputActionOrigin_PS4_LeftStick_DPadEast88(Sony Dualshock 4) left joystick, digital movement (right quadrant)
k_EInputActionOrigin_PS4_RightStick_Move89(Sony Dualshock 4) right joystick, movement on any axis (analog value)
k_EInputActionOrigin_PS4_RightStick_Click90(Sony Dualshock 4) right joystick, clicked in (digital value)
k_EInputActionOrigin_PS4_RightStick_DPadNorth91(Sony Dualshock 4) right joystick, digital movement (upper quadrant)
k_EInputActionOrigin_PS4_RightStick_DPadSouth92(Sony Dualshock 4) right joystick, digital movement (lower quadrant)
k_EInputActionOrigin_PS4_RightStick_DPadWest93(Sony Dualshock 4) right joystick, digital movement (left quadrant)
k_EInputActionOrigin_PS4_RightStick_DPadEast94(Sony Dualshock 4) right joystick, digital movement (right quadrant)
k_EInputActionOrigin_PS4_DPad_North95(Sony Dualshock 4) digital pad, pressed (upper quadrant)
k_EInputActionOrigin_PS4_DPad_South96(Sony Dualshock 4) digital pad, pressed (lower quadrant)
k_EInputActionOrigin_PS4_DPad_West97(Sony Dualshock 4) digital pad, pressed (left quadrant)
k_EInputActionOrigin_PS4_DPad_East98(Sony Dualshock 4) digital pad, pressed (right quadrant)
k_EInputActionOrigin_PS4_Gyro_Move99(Sony Dualshock 4) gyroscope, analog movement in any axis
k_EInputActionOrigin_PS4_Gyro_Pitch100(Sony Dualshock 4) gyroscope, analog movement on the Pitch axis (point head up to ceiling, point head down to floor)
k_EInputActionOrigin_PS4_Gyro_Yaw101(Sony Dualshock 4) gyroscope, analog movement on the Yaw axis (turn head left to face one wall, turn head right to face other)
k_EInputActionOrigin_PS4_Gyro_Roll102(Sony Dualshock 4) gyroscope, analog movement on the Roll axis (tilt head left towards shoulder, tilt head right towards other shoulder)
k_EInputActionOrigin_PS4_Reserved0103Reserved for future use
k_EInputActionOrigin_PS4_Reserved1104Reserved for future use
k_EInputActionOrigin_PS4_Reserved2105Reserved for future use
k_EInputActionOrigin_PS4_Reserved3106Reserved for future use
k_EInputActionOrigin_PS4_Reserved4107Reserved for future use
k_EInputActionOrigin_PS4_Reserved5108Reserved for future use
k_EInputActionOrigin_PS4_Reserved6109Reserved for future use
k_EInputActionOrigin_PS4_Reserved7110Reserved for future use
k_EInputActionOrigin_PS4_Reserved8111Reserved for future use
k_EInputActionOrigin_PS4_Reserved9112Reserved for future use
k_EInputActionOrigin_PS4_Reserved10113Reserved for future use
k_EInputActionOrigin_XBoxOne_A114(XB1) digital face button A
k_EInputActionOrigin_XBoxOne_B115(XB1) digital face button B
k_EInputActionOrigin_XBoxOne_X116(XB1) digital face button Cross
k_EInputActionOrigin_XBoxOne_Y117(XB1) digital face button Y
k_EInputActionOrigin_XBoxOne_LeftBumper118(XB1) digital left shoulder button (aka left bumper)
k_EInputActionOrigin_XBoxOne_RightBumper119(XB1) digital right shoulder button (aka right bumper)
k_EInputActionOrigin_XBoxOne_Menu120(XB1) digital menu button (aka start)
k_EInputActionOrigin_XBoxOne_View121(XB1) digital view button (aka back)
k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull122(XB1) left analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_XBoxOne_LeftTrigger_Click123(XB1) left analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_XBoxOne_RightTrigger_Pull124(XB1) right analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_XBoxOne_RightTrigger_Click125(XB1) right analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_XBoxOne_LeftStick_Move126(XB1) left joystick, movement on any axis (analog value)
k_EInputActionOrigin_XBoxOne_LeftStick_Click127(XB1) left joystick, clicked in (digital value)
k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth128(XB1) left joystick, digital movement (upper quadrant)
k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth129(XB1) left joystick, digital movement (lower quadrant)
k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest130(XB1) left joystick, digital movement (left quadrant)
k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast131(XB1) left joystick, digital movement (right quadrant)
k_EInputActionOrigin_XBoxOne_RightStick_Move132(XB1) right joystick, movement on any axis (analog value)
k_EInputActionOrigin_XBoxOne_RightStick_Click133(XB1) right joystick, clicked in (digital value)
k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth134(XB1) right joystick, digital movement (upper quadrant)
k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth135(XB1) right joystick, digital movement (lower quadrant)
k_EInputActionOrigin_XBoxOne_RightStick_DPadWest136(XB1) right joystick, digital movement (left quadrant)
k_EInputActionOrigin_XBoxOne_RightStick_DPadEast137(XB1) right joystick, digital movement (right quadrant)
k_EInputActionOrigin_XBoxOne_DPad_North138(XB1) digital pad, pressed (upper quadrant)
k_EInputActionOrigin_XBoxOne_DPad_South139(XB1) digital pad, pressed (lower quadrant)
k_EInputActionOrigin_XBoxOne_DPad_West140(XB1) digital pad, pressed (left quadrant)
k_EInputActionOrigin_XBoxOne_DPad_East141(XB1) digital pad, pressed (right quadrant)
k_EInputActionOrigin_XBoxOne_Reserved0142Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved1143Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved2144Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved3145Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved4146Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved5147Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved6148Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved7149Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved8150Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved9151Reserved for future use
k_EInputActionOrigin_XBoxOne_Reserved10152Reserved for future use
k_EInputActionOrigin_XBox360_A153(X360) digital face button A
k_EInputActionOrigin_XBox360_B154(X360) digital face button B
k_EInputActionOrigin_XBox360_X155(X360) digital face button X
k_EInputActionOrigin_XBox360_Y156(X360) digital face button Y
k_EInputActionOrigin_XBox360_LeftBumper157(X360) digital left shoulder button (aka left bumper)
k_EInputActionOrigin_XBox360_RightBumper158(X360) digital right shoulder button (aka right bumper)
k_EInputActionOrigin_XBox360_Start159(X360) digital start button
k_EInputActionOrigin_XBox360_Back160(X360) digital back button
k_EInputActionOrigin_XBox360_LeftTrigger_Pull161(X360) left analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_XBox360_LeftTrigger_Click162(X360) left analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_XBox360_RightTrigger_Pull163(X360) right analog trigger, pulled by any amount (analog value)
k_EInputActionOrigin_XBox360_RightTrigger_Click164(X360) right analog trigger, pulled in all the way (digital value)
k_EInputActionOrigin_XBox360_LeftStick_Move165(X360) left joystick, movement on any axis (analog value)
k_EInputActionOrigin_XBox360_LeftStick_Click166(X360) left joystick, clicked in (digital value)
k_EInputActionOrigin_XBox360_LeftStick_DPadNorth167(X360) left joystick, digital movement (upper quadrant)
k_EInputActionOrigin_XBox360_LeftStick_DPadSouth168(X360) left joystick, digital movement (lower quadrant)
k_EInputActionOrigin_XBox360_LeftStick_DPadWest169(X360) left joystick, digital movement (left quadrant)
k_EInputActionOrigin_XBox360_LeftStick_DPadEast170(X360) left joystick, digital movement (right quadrant)
k_EInputActionOrigin_XBox360_RightStick_Move171(X360) right joystick, movement on any axis (analog value)
k_EInputActionOrigin_XBox360_RightStick_Click172(X360) right joystick, clicked in (digital value)
k_EInputActionOrigin_XBox360_RightStick_DPadNorth173(X360) right joystick, digital movement (upper quadrant)
k_EInputActionOrigin_XBox360_RightStick_DPadSouth174(X360) right joystick, digital movement (lower quadrant)
k_EInputActionOrigin_XBox360_RightStick_DPadWest175(X360) right joystick, digital movement (left quadrant)
k_EInputActionOrigin_XBox360_RightStick_DPadEast176(X360) right joystick, digital movement (right quadrant)
k_EInputActionOrigin_XBox360_DPad_North177(X360) digital pad, pressed (upper quadrant)
k_EInputActionOrigin_XBox360_DPad_South178(X360) digital pad, pressed (lower quadrant)
k_EInputActionOrigin_XBox360_DPad_West179(X360) digital pad, pressed (left quadrant)
k_EInputActionOrigin_XBox360_DPad_East180(X360) digital pad, pressed (right quadrant)
k_EInputActionOrigin_XBox360_Reserved0181Reserved for future use
k_EInputActionOrigin_XBox360_Reserved1182Reserved for future use
k_EInputActionOrigin_XBox360_Reserved2183Reserved for future use
k_EInputActionOrigin_XBox360_Reserved3184Reserved for future use
k_EInputActionOrigin_XBox360_Reserved4185Reserved for future use
k_EInputActionOrigin_XBox360_Reserved5186Reserved for future use
k_EInputActionOrigin_XBox360_Reserved6187Reserved for future use
k_EInputActionOrigin_XBox360_Reserved7188Reserved for future use
k_EInputActionOrigin_XBox360_Reserved8189Reserved for future use
k_EInputActionOrigin_XBox360_Reserved9190Reserved for future use
k_EInputActionOrigin_XBox360_Reserved10191Reserved for future use
k_EInputActionOrigin_Switch_A192(Nintendo Switch Pro) digital face button A
k_EInputActionOrigin_Switch_B193(Nintendo Switch Pro) digital face button B
k_EInputActionOrigin_Switch_X194(Nintendo Switch Pro) digital face button X
k_EInputActionOrigin_Switch_Y195(Nintendo Switch Pro) digital face button Y
k_EInputActionOrigin_Switch_LeftBumper196(Nintendo Switch Pro) digital left shoulder button (aka left bumper)
k_EInputActionOrigin_Switch_RightBumper197(Nintendo Switch Pro) digital right shoulder button (aka right bumper)
k_EInputActionOrigin_Switch_Plus198(Nintendo Switch Pro) plus button
k_EInputActionOrigin_Switch_Minus199(Nintendo Switch Pro) minus button
k_EInputActionOrigin_Switch_Capture200(Nintendo Switch Pro) digital capture button
k_EInputActionOrigin_Switch_LeftTrigger_Pull201(Nintendo Switch Pro) left trigger, clicked
k_EInputActionOrigin_Switch_LeftTrigger_Click202(Nintendo Switch Pro) left trigger, clicked (same as previous value)
k_EInputActionOrigin_Switch_RightTrigger_Pull203(Nintendo Switch Pro) right trigger, clicked
k_EInputActionOrigin_Switch_RightTrigger_Click204(Nintendo Switch Pro) right trigger, clicked (same as previous value)
k_EInputActionOrigin_Switch_LeftStick_Move205(Nintendo Switch Pro) left joystick, movement on any axis (analog value)
k_EInputActionOrigin_Switch_LeftStick_Click206(Nintendo Switch Pro) left joystick, clicked in (digital value)
k_EInputActionOrigin_Switch_LeftStick_DPadNorth207(Nintendo Switch Pro) left joystick, digital movement (upper quadrant)
k_EInputActionOrigin_Switch_LeftStick_DPadSouth208(Nintendo Switch Pro) left joystick, digital movement (lower quadrant)
k_EInputActionOrigin_Switch_LeftStick_DPadWest209(Nintendo Switch Pro) left joystick, digital movement (left quadrant)
k_EInputActionOrigin_Switch_LeftStick_DPadEast210(Nintendo Switch Pro) left joystick, digital movement (right quadrant)
k_EInputActionOrigin_Switch_RightStick_Move211(Nintendo Switch Pro) right joystick, movement on any axis (analog value)
k_EInputActionOrigin_Switch_RightStick_Click212(Nintendo Switch Pro) right joystick, clicked in (digital value)
k_EInputActionOrigin_Switch_RightStick_DPadNorth213(Nintendo Switch Pro) right joystick, digital movement (upper quadrant)
k_EInputActionOrigin_Switch_RightStick_DPadSouth214(Nintendo Switch Pro) right joystick, digital movement (lower quadrant)
k_EInputActionOrigin_Switch_RightStick_DPadWest215(Nintendo Switch Pro) right joystick, digital movement (left quadrant)
k_EInputActionOrigin_Switch_RightStick_DPadEast216(Nintendo Switch Pro) right joystick, digital movement (right quadrant)
k_EInputActionOrigin_Switch_DPad_North217(Nintendo Switch Pro) digital pad, pressed (upper quadrant)
k_EInputActionOrigin_Switch_DPad_South218(Nintendo Switch Pro) digital pad, pressed (lower quadrant)
k_EInputActionOrigin_Switch_DPad_West219(Nintendo Switch Pro) digital pad, pressed (left quadrant)
k_EInputActionOrigin_Switch_DPad_East220(Nintendo Switch Pro) digital pad, pressed (right quadrant)
k_EInputActionOrigin_SwitchProGyro_Move221(Nintendo Switch Pro) gyroscope, analog movement in any axis
k_EInputActionOrigin_SwitchProGyro_Pitch222(Nintendo Switch Pro) gyroscope, analog movement on the Pitch axis (point head up to ceiling, point head down to floor)
k_EInputActionOrigin_SwitchProGyro_Yaw223(Nintendo Switch Pro) gyroscope, analog movement on the Yaw axis (turn head left to face one wall, turn head right to face other)
k_EInputActionOrigin_SwitchProGyro_Roll224(Nintendo Switch Pro) gyroscope, analog movement on the Roll axis (tilt head left towards shoulder, tilt head right towards other shoulder)
k_EInputActionOrigin_Switch_Reserved0225Reserved for future use
k_EInputActionOrigin_Switch_Reserved1226Reserved for future use
k_EInputActionOrigin_Switch_Reserved2227Reserved for future use
k_EInputActionOrigin_Switch_Reserved3228Reserved for future use
k_EInputActionOrigin_Switch_Reserved4229Reserved for future use
k_EInputActionOrigin_Switch_Reserved5230Reserved for future use
k_EInputActionOrigin_Switch_Reserved6231Reserved for future use
k_EInputActionOrigin_Switch_Reserved7232Reserved for future use
k_EInputActionOrigin_Switch_Reserved8233Reserved for future use
k_EInputActionOrigin_Switch_Reserved9234Reserved for future use
k_EInputActionOrigin_Switch_Reserved10235Reserved for future use
k_EInputActionOrigin_Count258The number of values in this enum, useful for iterating.
k_EInputActionOrigin_MaximumPossibleValue32767The 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.

이름설명
k_EInputSource_None0No controller source.
k_EInputSource_LeftTrackpad1The left touchpad, or the left half of a central touchpad.
k_EInputSource_RightTrackpad2The right touchpad, or the right half of a central touchpad.
k_EInputSource_Joystick3조이스틱 또는 왼쪽 조이스틱(조이스틱이 2개 이상인 경우)
k_EInputSource_ABXY4The four main face buttons.
k_EInputSource_Switch5Switches/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_EInputSource_LeftTrigger6The left analog trigger.
k_EInputSource_RightTrigger7The right analog trigger.
k_EInputSource_Gyro8The internal gyroscope.
k_EInputSource_CenterTrackpad9The central touchpad. (DS4 only)
k_EInputSource_RightJoystick10The right joystick. If there is only one joystick, this source is not used.
k_EInputSource_DPad11The digital pad.
k_EInputSource_Key12Keyboard key (for keyboards with scan codes).
k_EInputSource_Mouse13Traditional mouse
k_EInputSource_Count14The 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_EInputSource_Joystick and the EControllerSourceMode would be k_EInputSourceMode_Dpad. The mode also changes the input data received by any associated actions.

이름설명
k_EInputSourceMode_None0No input mode.
k_EInputSourceMode_Dpad1A 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_EInputSourceMode_Buttons2
k_EInputSourceMode_FourButtons3Four digital face buttons, any of which can be pressed simultaneously
k_EInputSourceMode_AbsoluteMouse4
k_EInputSourceMode_RelativeMouse5
k_EInputSourceMode_JoystickMove6
k_EInputSourceMode_JoystickMouse7
k_EInputSourceMode_JoystickCamera8
k_EInputSourceMode_ScrollWheel9
k_EInputSourceMode_Trigger10
k_EInputSourceMode_TouchMenu11
k_EInputSourceMode_MouseJoystick12
k_EInputSourceMode_MouseRegion13
k_EInputSourceMode_RadialMenu14
k_EInputSourceMode_SingleButton15
k_EInputSourceMode_Switches16

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.

이름설명
k_ESteamControllerLEDFlag_SetColor0Set the color to the specified values
k_ESteamControllerLEDFlag_RestoreUserDefault1Restore the color to default (out-of-game) settings

ESteamInputType

Represents the device model for a given piece of hardware.

이름Value설명
k_ESteamInputType_Unknown0Catch-all for unrecognized devices
k_ESteamInputType_SteamController1Valve's Steam Controller
k_ESteamInputType_XBox360Controller2Microsoft's XBox 360 Controller
k_ESteamInputType_XBoxOneController3Microsoft's XBox One Controller
k_ESteamInputType_GenericXInput4Any generic 3rd-party XInput device
k_ESteamInputType_PS4Controller5Sony's PlayStation 4 Controller
k_ESteamInputType_AppleMFiController6미사용
k_ESteamInputType_AndroidController7미사용
k_ESteamInputType_SwitchJoyConPair8미사용
k_ESteamInputType_SwitchJoyConSingle9미사용
k_ESteamInputType_SwitchProController10Nintendo's Switch Pro Controller
k_ESteamInputType_MobileTouch11Steam Link App's Mobile Touch Controller
k_ESteamInputType_PS3Controller12Sony's PlayStation 3 Controller or PS3/PS4 compatible fight stick
k_ESteamInputType_Count13Current number of values returned
k_ESteamInputType_MaximumPossibleValue255Maximum 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.

이름ValueDescription
k_ESteamControllerPad_Left0The left touchpad region on a Steam Controller Device. Compatible models: VSC, DS4
k_ESteamControllerPad_Right1The right region on a Steam Controller Device. Compatible models: VSC, DS4

Typedefs

These are typedefs which are defined for use with ISteamInput.

NameBase typeDescription
InputActionSetHandle_tuint64These 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
InputAnalogActionHandle_tuint64A handle to an analog action. This can be obtained from ISteamInput::GetAnalogActionHandle.
InputDigitalActionHandle_tuint64A handle to a digital action. This can be obtained from ISteamInput::GetDigitalActionHandle.
InputHandle_tuint64This handle will consistently identify a controller, even if it is disconnected and re-connected

상수

These are constants which are defined for use with ISteamInput.

이름유형설명
STEAMINPUT_INTERFACE_VERSIONconst char *"SteamInput001"
STEAM_INPUT_HANDLE_ALL_CONTROLLERSintUINT64_MAXWhen 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_INPUT_MAX_ANALOG_ACTIONSint16The maximum number of analog actions that can be performed on each controller.
STEAM_INPUT_MAX_ANALOG_ACTION_DATAfloat1.0fThe maximum value that can be reported by an analog action on any given axis.
STEAM_INPUT_MAX_COUNTint16The maximum number of controllers that can be used simultaneously with the Steam Input Configurator.
STEAM_INPUT_MAX_DIGITAL_ACTIONSint128The maximum number of digital actions that can be performed on each controller.
STEAM_INPUT_MAX_ORIGINSint8The maximum number of input origins that can be attached to a single action.
STEAM_INPUT_MIN_ANALOG_ACTION_DATAfloat-1.0fThe minimum value that can be reported by an analog action on any given axis.