Fix Controller Input when a Game Doesn't Use Steam Input

Background Knowledge

Steam Input is an interface for developers to use the controller configuration built into Steam for their games. It is entirely optional and not all games use it.

Steam gives you the option to enable and disable Steam Input on a per game basis.

Steam has controller button mapping for in-game, Big Picture Mode, and on desktop (outside of games), and mappings for individual games.

By default Steam will give certain controllers a desktop mapping that lets you move the mouse and bring up an on-screen keyboard, which is not what you want in a game.

If you press F11 in a game and Steam Overlay doesn't appear and you have it configured to appear, Steam thinks that you are not in a game, and therefore it will use the desktop mapping instead of the in-game mapping.

Steam Input works by capturing inputs from your controller, suppressing them from the rest of your system and emitting the inputs that you desire instead to the rest of your system.

Problem

If you are playing a game with Steam Input disabled, Steam may think you are not in a game, so it changes your inputs to the desktop configuration, causing the game to not receive regular controller input.

Solution

You can set Steam to treat your controller as a controller while on the desktop. So therefore while Steam thinks you're out of game, it still acts like a game controller, so while in-game, you can game.

Settings > Controller > Desktop Configuration > Browse Configs > Templates > Gamepad

A Detour Describing Stuff I Tried

This is on Linux btw.

I was playing a game where Steam Input didn't work, but I knew my XBox One Controller worked with it disabled, but my Nintendo Switch Pro Controller didn't work with it disabled (it was moving the mouse and stuff).

Before learning about desktop mode, I tried using `xboxdrv` to map my Pro Controller to an XBox Controller. This worked perfectly while Steam was closed. The Switch Controller's input was grabbed by the virtual XBox Controller input, meaning programs could only receive input from xboxdrv instead of both xboxdrv and the Pro Controller.

However once I opened Steam, it mysteriously was able to read both inputs and so in game (and Big Picture Mode) I was getting the virtual XBox Controller input as expected but also the weird desktop behaviour of the Switch Controller.

While Steam was open, `evtest` no longer showed output for my virtual XBox Controller. So programs seem to have different priorities for reading inputs and Steam was taking over xboxdrv.

(This happened yesterday so I hope I recall the last 2 paragraphs correctly. It seems possible the game was receiving both and I couldn't see it with `evtest` because Steam had grabbed (i.e. consumed) the input before evtest could look at it. But also I might have been looking at the output from `xboxdrv` when I saw it work or not work, but that makes less sense. No I'm not about to try it again for the sake of this article. The solution is so simple compared to the stuff I spent my time doing.)


Comments

Popular posts from this blog

Fix Inability to Move Files to Trash in VSC

VSC Vanishing Go Imports