Skip to content

Add Steam Controller touchpads, capacitive touch for sticks, and grip sense#15528

Merged
slouken merged 4 commits into
libsdl-org:mainfrom
ceski-1:extra-sc-inputs
May 14, 2026
Merged

Add Steam Controller touchpads, capacitive touch for sticks, and grip sense#15528
slouken merged 4 commits into
libsdl-org:mainfrom
ceski-1:extra-sc-inputs

Conversation

@ceski-1
Copy link
Copy Markdown
Contributor

@ceski-1 ceski-1 commented May 7, 2026

  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

  • Adds buttons for left/right touchpad click, stick touch, and grip sense
  • Updates mapping string
  • Touchpads can now send pressure and position

Existing Issue(s)

#15471

@ceski-1 ceski-1 changed the title Add Steam Controller touchpads, stick touch, and grip sense Add Steam Controller touchpads, capacitive touch for sticks, and grip sense May 7, 2026
@isXander
Copy link
Copy Markdown
Contributor

isXander commented May 7, 2026

How does this behave with and without the Steam Client running in the background?

What about gyro?

@ceski-1
Copy link
Copy Markdown
Contributor Author

ceski-1 commented May 8, 2026

How does this behave with and without the Steam Client running in the background?

What about gyro?

A tester confirmed that it works fine with or without Steam running. Gyro was already supported prior to this PR but I asked two testers to check and they confirmed that it works as expected.

@ceski-1 ceski-1 marked this pull request as ready for review May 8, 2026 01:38
@AL2009man
Copy link
Copy Markdown
Contributor

AL2009man commented May 8, 2026

How does this behave with and without the Steam Client running in the background?
What about gyro?

A tester confirmed that it works fine with or without Steam running. Gyro was already supported prior to this PR but I asked two testers to check and they confirmed that it works as expected.

I am now a tester, i got my Steam Controller (2026), and i can confirm that it is indeed working as expected.

the Touchpad Click (pressure-based) might be problematic, due to Misc stuffs being reused

image

@isXander
Copy link
Copy Markdown
Contributor

A tester confirmed that it works fine with or without Steam running.

Has this been tested on SteamOS gaming mode?

With how the Steam Deck's embedded controller device behaves in this environment (it gets proxied by Steam Virtual Gamepad), I had made the assumption that the Steam Controller would exhibit the exact same behaviour.

@ceski-1
Copy link
Copy Markdown
Contributor Author

ceski-1 commented May 10, 2026

Has this been tested on SteamOS gaming mode?

It has not. If you want, you could make a build that combines this PR with the updated testcontroller PR and have someone try it out. I won't receive my controller until next week.

@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 11, 2026

@ceski-1, I'm moving this to draft until you get your controller and can test directly.

Comment thread src/joystick/SDL_gamepad.c Outdated
} else if (SDL_IsJoystickSteamTriton(vendor, product)) {
// Second generation Steam controllers have 4 back paddle buttons
SDL_strlcat(mapping_string, "misc1:b11,paddle1:b12,paddle2:b13,paddle3:b14,paddle4:b15", sizeof(mapping_string));
SDL_strlcat(mapping_string, "misc1:b11,paddle1:b12,paddle2:b13,paddle3:b14,paddle4:b15,touchpad:b16,misc2:b17,misc3:b18,misc4:b19,misc5:b20,misc6:b21", sizeof(mapping_string));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably a misc is being used as the second touchpad? Maybe work a comment.

@BanchouBoo
Copy link
Copy Markdown

Tested on Linux with testcontroller, works with both Steam running and not running.

With Steam running, Steam still sends the desktop profile inputs in addition to SDL seeing the gamepad inputs.

With Steam not running, it successfully disables lizard mode so it's not sending any keyboard/mouse inputs while SDL is reading it as a gamepad, and once I close testcontroller after a few seconds lizard mode successfully starts working again.

@isXander
Copy link
Copy Markdown
Contributor

Tested on Linux with testcontroller, works with both Steam running and not running.

Did you check specifically on SteamOS in Gaming mode? Or just generic Linux + generic steam client? It's important to test functionality in gaming mode, as this has caused issues in the past with other Valve hardware.

@Birdulon
Copy link
Copy Markdown

A tester confirmed that it works fine with or without Steam running.

Has this been tested on SteamOS gaming mode?

With how the Steam Deck's embedded controller device behaves in this environment (it gets proxied by Steam Virtual Gamepad), I had made the assumption that the Steam Controller would exhibit the exact same behaviour.

Playing around with a Steam Controller Puck plugged into a Steam Deck and testcontroller from #15540 , it's more or less the same behaviour as far as I can tell. In desktop mode I can see all the buttons with or without Steam running, but in gaming mode I can't work out how to launch testcontroller without Steam Input unhelpfully pretending both the deck and the Steam Controller are basic xbox controllers, much like launching as a non-steam game from Steam in desktop mode. At least bluetooth seems to behave the same as the puck in desktop mode.

@BanchouBoo
Copy link
Copy Markdown

Tested on Linux with testcontroller, works with both Steam running and not running.

Did you check specifically on SteamOS in Gaming mode? Or just generic Linux + generic steam client? It's important to test functionality in gaming mode, as this has caused issues in the past with other Valve hardware.

Gentoo Linux with the regular steam client. I don't have any devices with SteamOS to test on.

@slouken slouken marked this pull request as ready for review May 14, 2026 06:49
@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 14, 2026

@ceski-1, this generally looks good. I'm not sure that we want to map everything to the misc buttons the way you've done it. If you'd like to pull the mapping changes out to a separate PR for discussion, we can merge the core hidapi changes once you've tested them with your own controller.

@Squall-Leonhart
Copy link
Copy Markdown

does this controller need libusb for gyro on windows?

@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 14, 2026

does this controller need libusb for gyro on windows?

No, it doesn't.

@ceski-1
Copy link
Copy Markdown
Contributor Author

ceski-1 commented May 14, 2026

@ceski-1, this generally looks good. I'm not sure that we want to map everything to the misc buttons the way you've done it. If you'd like to pull the mapping changes out to a separate PR for discussion, we can merge the core hidapi changes once you've tested them with your own controller.

Fixed in fa16d07

@ceski-1
Copy link
Copy Markdown
Contributor Author

ceski-1 commented May 14, 2026

@slouken Okay, I tested with a new Steam Controller and the changes made by this PR work fine. Using testcontroller, the touchpads (click, touch, x, y, pressure), capacitive touch for sticks, and grip sense are all functional. The mapping has been removed for now, though, so of those features, only partial touchpad support remains (touch, x, y, and pressure). The features that were already present prior to this PR are fine too (back buttons, gyro/accel, and QAM button).

What's not addressed by this PR, because it's a separate topic, is the long running problem of Steam Input interfering in various ways. See here for details: #15471 (comment)

@slouken slouken merged commit f3faf67 into libsdl-org:main May 14, 2026
46 checks passed
@slouken
Copy link
Copy Markdown
Collaborator

slouken commented May 14, 2026

Great! This is merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants