| name | steam-input-controller |
|---|---|
| description | Integrate Steam Input for controller support. Covers ISteamInput for detecting controllers, configuring action sets, binding actions, and retrieving button glyphs. Use when adding controller support, configuring input for Steam Deck, or implementing action-based input systems. |
| standards-version | 1.9.0 |
Use this skill when the user:
- Is adding controller support to their Steam game
- Needs to configure Steam Input action sets or bindings
- Wants button glyph images for prompt display
- Is targeting Steam Deck and needs input guidance
- Asks about
ISteamInput, IGA files, or controller types
- App ID - the game's Steam App ID
- Input actions - the game actions to map (move, jump, fire, etc.)
Steam Input provides a unified API across all controller types. Instead of polling raw buttons, you define actions and let players bind them to any controller.
Key concepts:
- Action Set - a group of actions active at a given time (e.g., "InGame", "Menu", "Vehicle")
- Digital Action - on/off (jump, fire, pause)
- Analog Action - continuous (move, camera, steering)
Create a game_actions_{appid}.vdf file defining your input configuration:
"In Game Actions"
{
"actions"
{
"InGame"
{
"title" "#Set_InGame"
"StickPadGyro"
{
"Move"
{
"title" "#Action_Move"
"input_mode" "joystick_move"
}
"Camera"
{
"title" "#Action_Camera"
"input_mode" "absolute_mouse"
}
}
"Buttons"
{
"Jump"
{
"title" "#Action_Jump"
}
"Fire"
{
"title" "#Action_Fire"
}
"Pause"
{
"title" "#Action_Pause"
}
}
}
}
"localization"
{
"english"
{
"Set_InGame" "In-Game Controls"
"Action_Move" "Move"
"Action_Camera" "Camera"
"Action_Jump" "Jump"
"Action_Fire" "Fire"
"Action_Pause" "Pause"
}
}
}Upload this file in the Steamworks Partner site under Application > Steam Input.
Initialize:
SteamInput()->Init(false);
SteamInput()->EnableDeviceCallbacks();Get connected controllers:
InputHandle_t handles[STEAM_INPUT_MAX_COUNT];
int count = SteamInput()->GetConnectedControllers(handles);Activate an action set:
InputActionSetHandle_t inGameSet = SteamInput()->GetActionSetHandle("InGame");
SteamInput()->ActivateActionSet(handles[0], inGameSet);Read digital action (button press):
InputDigitalActionHandle_t jumpAction = SteamInput()->GetDigitalActionHandle("Jump");
InputDigitalActionData_t data = SteamInput()->GetDigitalActionData(handles[0], jumpAction);
if (data.bState && data.bActive) {
// Jump pressed
}Read analog action (stick/mouse):
InputAnalogActionHandle_t moveAction = SteamInput()->GetAnalogActionHandle("Move");
InputAnalogActionData_t data = SteamInput()->GetAnalogActionData(handles[0], moveAction);
float x = data.x; // -1.0 to 1.0
float y = data.y;Show the correct button icon for the player's controller type:
InputDigitalActionHandle_t jumpAction = SteamInput()->GetDigitalActionHandle("Jump");
EInputActionOrigin origins[STEAM_INPUT_MAX_ORIGINS];
int count = SteamInput()->GetDigitalActionOrigins(handles[0], inGameSet, jumpAction, origins);
if (count > 0) {
const char* glyphPath = SteamInput()->GetGlyphPNGForActionOrigin(origins[0],
k_ESteamInputGlyphSize_Small, 0);
// Load glyphPath as texture for UI prompt
}This returns the correct icon (A button for Xbox, X button for PlayStation, etc.) automatically.
| Controller | ESteamInputType |
|---|---|
| Xbox 360/One/Series | k_ESteamInputType_XBox360Controller / XBoxOneController |
| PlayStation 4/5 | k_ESteamInputType_PS4Controller / PS5Controller |
| Switch Pro | k_ESteamInputType_SwitchProController |
| Steam Controller | k_ESteamInputType_SteamController |
| Steam Deck | k_ESteamInputType_SteamDeckController |
| Generic | k_ESteamInputType_GenericGamepad |
| Resource | URL |
|---|---|
| Steam Input overview | https://partner.steamgames.com/doc/features/steam_controller |
| ISteamInput API | https://partner.steamgames.com/doc/api/isteaminput |
| IGA file format | https://partner.steamgames.com/doc/features/steam_controller/iga_file |
| Getting Started guide | https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_devs |
User: "My platformer has move, jump, dash, and pause. How do I set up Steam Input so it works on Xbox controllers and Steam Deck?"
Agent:
- Creates the IGA VDF file with one "InGame" action set
- Defines Move (analog), Jump/Dash/Pause (digital)
- Shows SDK init + action reading code
- Implements glyph retrieval for dynamic button prompts
- Notes: "Steam Deck uses the same ISteamInput API. The built-in controls map to
k_ESteamInputType_SteamDeckController. Test with the Steam Deck virtual controller in Desktop mode."
Steam Input is an in-process Steamworks SDK API (ISteamInput) with no Web API equivalent. This skill remains documentation-only regardless of whether the Steam MCP server is available.
- Not calling
RunFrame()every tick —ISteamInputrequiresRunFrame()each frame to poll controller state. Without it, input data is stale. - Hardcoding button mappings instead of using action sets — Steam Input's power comes from action-based input (e.g. "Jump" not "Button A"). Hardcoding bypasses user rebinding and Steam Deck optimization.
- Forgetting to ship the IGA (In-Game Actions) file — the controller configuration file must be uploaded to Steamworks Partner. Without it, Steam Input falls back to legacy mode.
- Not testing with Steam Deck controls — the Deck's trackpads and gyro behave differently from standard controllers. Test with a Deck or use Desktop mode to simulate.
- Ignoring the
InputActionSetHandlelifecycle — action set handles must be obtained viaGetActionSetHandle()after init. Using stale handles causes silent failures.
- Steam Deck Compatibility - rule that flags input and compatibility issues for Steam Deck