mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[GH-ISSUE #2627] [Feature Request]: Improved touchpad emulation for Xbox gamepads #858
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @2mg on GitHub (Mar 8, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2627
Checklist
Description
Currently, Xbox/Xinput gamepads (without touchpad) can't utilize some features in games that actually support DS4's touchpad/click/zones.
I'm unsure if any games use touchpad for finger gestures, but that might not be off the table too.
Current input implementation offers mapping just one specific touchpad action to just one gamepad button.
Consider adding an option (if possible customizable) where a holding a specific button for a few moments or pressing a specific multiple button combination (macro) switches thru Touchpad actions, or simulates a specific Touchpad action.
PS: I'm unaware if using Steam as a gamepad handler allows for some macros that could be passed to ShadPS4, but that might be out of scope here.
Reason
It will improve gameplay experience in games that support (or expect) DS4's touchpad beyond it just being a simple button.
Examples
In BB, it is currently impossible to have Gestures and Personal Effects (and some tiny menu options) due to them being bound to touchpad zones.
@Hermiten commented on GitHub (Mar 29, 2025):
Maybe for you @kalaposfos13 (again, sorry)
@Pipi86 commented on GitHub (Jun 11, 2025):
This is also really needed for ps1 converted games using xbox controllers (also ppl using keyboard should be benefited), bc for them you definitely need to bind select button to "touchpad left" and start button to "touchpad right" in order to have a smooth gameplay experience without any interruptions. Otherwise every time you want to use touchpad left for ps1 select button, you have to start a journey through emulator settings, just to open a game menu when midgameplay, and sometimes you need to do the same but just to press ps1 start button.
@ctrlinsert commented on GitHub (Jun 11, 2025):
The touchpad needs to be emulated for XInput gamepads in titles like Infamous where the touchpad is tied into a crucial game mechanic (in this case, power drain). Additionally, there needs to be a button to emulate controller tilt for titles that require it (Infamous requires this for the stencil art mechanic in Second Son and Gran Turismo has an optional motion steering mechanic that relies on it).
I think the problem that’ll be ran into here is that controllers only have so many buttons and even if you have a controller with paddles (Scuf, Elite Series 1/2, et al.) those buttons act more like a symlink to another button than a button unto themselves.
It may be necessary, but I don’t think it’ll be able to be cleanly implemented.
@Pipi86 commented on GitHub (Jun 11, 2025):
Well, i think motion controls to xbox controller or keyboard are impossible (maybe mouse can partially emulate them).
In the case of the limited amount of buttons in xbox controllers, home button is available to be bind i.e. to "option button". You could even use button combinations like "home button+select button" for "touchpad left", and "home button+start button" for touchpad right.
@ctrlinsert commented on GitHub (Jun 11, 2025):
Steam co-opts the Guide button to be used for big picture, and Game Bar intercepts it to open the Xbox overlay in games. Using that as a button wouldn’t be feasible.
Combo inputs just sound like a way to end up with accidental inputs elsewhere in the game. The most realistic (imo) way to do it is to use an analog component on the controller to simulate gyro sensor input — LT all the way down is gyro left, RT all the way down is gyro right, same with analog sticks. This wouldn’t fix the issues with using motion controls in Gran Turismo or the like, but would fix the issues you’d have with Infamous requiring you to tilt the controller and shake it for the stencil art mechanic (which is required as the first thing you do after the intro cutscene).
The touchpad will always be a messy implementation, as the most you’ll get is a left and right touchpad click for functionality on XInput as there’s no additional button to map for middle touchpad.
@Pipi86 commented on GitHub (Jun 11, 2025):
Guide button can be disabled in both of them so shadps4 could make exclusive use of it. I have them both disabled so i can open RPCS3 overlay menu while in-game.
Combo inputs are completely possible, RPCS3 is able to do use combo inputs without any accidental inputs, this way i managed to do a complete run on Demon's Souls a couple of years ago using kb+m.
That's a much better idea than using mouse, binding some button to toggle gyro sensor emulation making use of left & right sticks and Left & right triggers.
You could map guide button alone to "touchpad center". Also, while it's true that what've proposed is very basic, it's still far better than what we have right now, and would make life a lot easier for those trying to play "Playstation Plus Classics" games, like me.
@GHU7924 commented on GitHub (Jun 19, 2025):
Problems:
The Xbox controller does not have a gyroscope, it needs to be emulated.
Gamebar is bound to the Xbox button (so it is better not to touch it).
There is no touchpad.
There are actually 2 options here:
The simplest, either somehow indicate for such games that in order to play this game you need a Dualshock 4 (or Dualsense), or a gamepad that has the same features, otherwise you will not be able to play, because other controllers are not supported in this game. (In RPCS3 it was easier, since Dualshock 3 did not have a touchpad)
More complex, use combinations to, for example, call up a wheel with possible options (similar menus can be used, for example, in Steam Deck).
But the thing is that in the same "inFAMOUS" there are also combinations of actions, for example, you need to break generators in cars, to do this you need to swipe up on the touchpad and hold, then press R2 several times to break.
I don't really like Dualshock 4, I like the Xbox controller better, but in my opinion it would be easier to go the first way, so as not to reinvent the wheel. It would be easier to tell the user to use a gamepad that will support full functionality than to juggle on the gamepad.
I also suggested similar solutions for emulating the touchpad on the keyboard, but now I think it is better to abandon these solutions.
I do not claim to be the truth and express my personal opinion on this issue.
In any case, @georgemoralis and @kalaposfos13 should discuss this issue and choose the direction in which to move.
@ctrlinsert commented on GitHub (Jun 19, 2025):
inFAMOUS has perhaps the most superficial implementation of the touchpad feature, it's truthfully mostly a gimmick (not surprising when you consider that it's a first party title released around the launch of the console) and could truthfully have the touchpad gestures locked to an analog stick.
Additionally, the touchpad clicks aren't location dependent in inFAMOUS. This means that the game doesn't rely on touchpad left/center/right to register inputs such as return to shore, energy drain, or for QTEs.
The far more pressing issue for Xbox controllers to be feature complete for games like inFAMOUS are the gyroscope controls for activities such as the stencil art.