Porting & co-development
How to Add Controller Support to Your Game
To add controller support to your game, route all input through named actions instead of reading keys directly, bind those actions to gamepad buttons and sticks, make every menu navigable with a d-pad, show the right button prompts for the connected device, and test with several controllers. The gameplay mapping is usually the easy part; menus, prompts and edge cases take most of the time.
Step 1: Build an input abstraction
If gameplay code checks for specific keys, such as "is Space pressed", adding a controller means touching every one of those checks. The fix is an action layer: gameplay asks "is Jump pressed", and a separate mapping decides which keys and buttons mean Jump.
Most engines provide this already:
- Unity: the Input System package uses Input Action assets with actions, bindings and control schemes, and supports rebinding at runtime. The legacy Input Manager has basic joystick axes but is far less capable for controllers.
- Godot: the Input Map defines named actions with keyboard, mouse and joypad events, and the
Inputsingleton queries them. Godot uses the SDL game controller database to map many controllers to a standard layout. - Unreal Engine: Enhanced Input uses Input Actions and Input Mapping Contexts, which you can swap at runtime for different modes.
Moving to an action layer is often the biggest single task when adding controller support to a game that was built for mouse or touch. It is a common part of the work in our game porting services, especially for mobile-to-PC ports.
Step 2: Design the controller mapping
List every action and decide where it goes on a standard gamepad. Follow genre conventions where they exist: players expect the bottom face button to confirm or jump and the right face button to cancel or go back on Xbox-style layouts. Nintendo controllers swap the face button positions, so test that confirm and cancel feel right with each.
- Put frequent actions on face buttons and triggers.
- Use shoulders for cycling, switching or secondary actions.
- Reserve the menu or start button for pause.
- Avoid requiring two sticks and a face button at the same time.
- If you run out of buttons, use context-sensitive actions or a radial menu rather than complex chords.
Step 3: Handle analog input properly
Sticks and triggers are analog, which is both an opportunity and a source of bugs.
Dead zones
Sticks rarely rest at exactly zero. Apply a dead zone so small drift does not move the character. A radial dead zone, applied to the stick's combined magnitude, usually feels better than separate dead zones per axis, which can make diagonals feel sticky. Let players adjust it, since older controllers drift more.
Response curves
For camera or aim control, a curve that is gentle near the centre and faster at the edge makes fine aiming easier. Offer sensitivity settings for each axis and an invert option for the camera.
Aiming
Shooters and twin-stick games often need aim assist on controller to compete with mouse precision. That is a design topic of its own; our post on aim assist and controller support in PC shooters goes into it.
Step 4: Make every menu navigable
This is where most controller support falls short. Every screen, including settings, pop-ups, store pages, the credits and error dialogs, must work without a mouse.
- Set a default selected element when each screen opens.
- Show a clear focus highlight that is visible on every background.
- Define navigation explicitly where automatic navigation picks the wrong neighbour.
- Make back always work and always do the same thing.
- Handle sliders, dropdowns, scroll lists and text fields with a controller.
- Restore focus to a sensible element when a pop-up closes.
Unity's uGUI uses the EventSystem with selectable navigation, UI Toolkit has its own focus system, and Godot's Control nodes support focus neighbours. All of them need deliberate setup per screen.
Step 5: Show the right button prompts
On-screen prompts must match the device the player is using. An Xbox player seeing PlayStation symbols, or keyboard keys while holding a pad, is confusing and is one of the things Steam Deck compatibility review looks at.
- Detect the last device used and switch prompts immediately when the player changes input.
- Ship glyph sets for at least keyboard and mouse, Xbox-style and PlayStation-style controllers, plus Nintendo-style if you support it.
- Update prompts after rebinding so they show the player's chosen button.
- If you use Steam Input, it can tell you the origin of an action, and Steamworks provides glyphs; see the Steam Input documentation.
Step 6: Platform layers and Steam Input
On Windows, Xbox controllers use XInput, and other controllers use various APIs that engines usually wrap for you. On macOS and iOS, Apple's Game Controller framework supports common Xbox, PlayStation and other MFi controllers. Android exposes controllers through its input APIs.
On Steam, Steam Input can sit between the controller and your game. Players can remap any controller, and Valve can translate many controllers into the layout your game expects. You can integrate the Steam Input API directly for action sets and accurate glyphs, or let Steam present controllers in a standard gamepad layout. Decide which approach you take, since it affects how you handle glyphs and configuration. Our Steamworks integration checklist covers Steam Input alongside other features.
Step 7: Edge cases
- Hot-plugging: connecting or disconnecting a controller mid-game should not crash or freeze input. Pause when the active controller disconnects.
- Multiple controllers: local multiplayer needs device assignment per player and a way to join or rejoin.
- Mixed input: players switch between mouse and pad; the UI and cursor should follow smoothly.
- Text entry: on Steam Deck and Big Picture mode, show the on-screen keyboard for name entry or use a controller-friendly picker.
- Rumble: make it optional, and stop it when the game pauses.
- Rebinding: let players remap actions, prevent conflicts and allow reset to defaults.
Testing checklist
Before you test in-game, check each controller on its own with our free gamepad tester. It shows how the browser and operating system see every button, trigger and stick, including resting stick offset, so you can tell hardware or driver problems apart from bugs in your input code.
- Play the full game start to finish without touching mouse or keyboard.
- Test with an Xbox-style, a PlayStation-style and a generic controller at minimum.
- Test on Steam Deck if you release on Steam.
- Unplug and reconnect controllers during gameplay, menus and loading.
- Check every prompt and tutorial text for the correct glyphs.
- Verify dead zones with an older, slightly drifting controller.
Ninja Fighters, our own browser platform fighter, supports both keyboard and gamepad, and fighting games make input bugs obvious quickly. That makes them a good test of whether an action layer holds up under pressure.
When to bring in a studio
Bring in help when controller support is part of a larger port, when your UI was built for mouse or touch and needs systematic rework, or when you are targeting Steam Deck and want to get the compatibility details right. An experienced team can refactor input and UI focus without disturbing gameplay code.
paxl.co adds controller support as part of ports to PC, Steam and handhelds, and a typical project takes 3–4 months from kickoff to launch. Find out more on our game porting and co-development page.
FAQ
Do I need to support PlayStation controllers separately from Xbox ones?
Gameplay mapping can be shared because the layouts are similar, but you should show PlayStation button symbols to PlayStation players. Engines and Steam Input can identify the controller type so you can switch glyph sets.
Is Steam Input enough to give my game controller support?
Steam Input can map controllers to your game, but it does not make your menus navigable or your prompts correct. You still need focus navigation in every screen and glyphs that match the player's device.
What dead zone value should I use?
There is no universal value, because controllers and sticks differ. Start with your engine's default, test with several controllers including worn ones, and expose a dead zone setting so players can adjust it.