Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support game controllers #99

Closed
laqyx opened this issue Mar 26, 2018 · 18 comments
Closed

Support game controllers #99

laqyx opened this issue Mar 26, 2018 · 18 comments

Comments

@laqyx
Copy link

laqyx commented Mar 26, 2018

I know its note quite the goal of this project but would it be possible to use an Xbox 360 controller connected to the pc on my android phone trough scrcpy

@rom1v rom1v changed the title A bit off topic but, ... Support game controllers Mar 27, 2018
@rom1v
Copy link
Collaborator

rom1v commented Mar 27, 2018

Technically, it's possible: GameController.

It would probably add some complexity to make the mappings customizable, though.

@ghost
Copy link

ghost commented Nov 18, 2018

Might as well consider keyboard mapping for games like pubg
Controlling android via keyboard by using different keys doing many things
On Linux.
It eliminates the need of emulator.

@AyraHikari
Copy link

Any update from this?

@Lolihunter1337
Copy link

Would also like to know

@m4heshd
Copy link

m4heshd commented Feb 12, 2020

I've been killing myself for hours now looking how to do this. 😔 Pretty much impossible unless you're able to simulate windows touch events using the controller.

It would probably add some complexity to make the mappings customizable, though.

Just need the controller to show up on Panda gamepad app or Octopus app.

@Dom-R
Copy link

Dom-R commented Apr 23, 2020

+1 to this idea. Would love to be able to use my Xbox controller to play on games that support controllers.

@ar065
Copy link

ar065 commented Apr 25, 2020

@m4heshd Maybe it's possible to map it to windows key presses? I don't really know though, just a big guess.

@rom1v rom1v mentioned this issue Sep 17, 2020
@tm9k1
Copy link

tm9k1 commented Nov 30, 2020

hi devs, are you working on this? I was trying to play Minecraft through scrcpy today when I found this issue. Would be great if this makes it to the application!

@ghost
Copy link

ghost commented Feb 9, 2021

I'm up for this, too!
I've not been able to find a perfect non-usb bluetooth controller that fits comfortably in my hands, and my phone doesn't support charge + usb otg at the same time, especially the device battery drains out quite fast while gaming.

Playing on scrcpy with controller, and with a bigger screen plus not having to worry about battery would be a blast!

@LHLaurini
Copy link
Contributor

LHLaurini commented Feb 12, 2021

From some quick investigation, I've discovered this is possible by using uinput. Normal apps don't have permission to use it, but the adb shell has. That means we can emulate any input device we want, including controllers. I may try writing a pull request when I have time, but it shouldn't be too much work.

PS: If anybody else wants to confirm it, run this from adb shell.

@LHLaurini
Copy link
Contributor

It's working. Please test #2130 and let me know about any issues.

@Diamantaeres
Copy link

Hello!

I tried to install and use #2130, but it's not working for me.
Should I make any particular configuration?

Please help me!

@LHLaurini
Copy link
Contributor

@scaldav If #2130 doesn't work for you, it's likely your phone isn't supported (at least not without root). Using the same method as in #2632 would probably make it work on all devices, but I'm currently not working on that anymore. Might give it a shot again someday, but I don't guarantee anything.

@Diamantaeres
Copy link

Diamantaeres commented Feb 10, 2022 via email

@27hectormanuel
Copy link

Any updates on this I would like to use my Xbox Wired controller via my PC

@paliszarok
Copy link

any updates? pls add...

@DarkevilPT
Copy link

Yo yo yo I also wanna play diablo immortal with my gamepad! It's the only and only missing feature we need!! plzz

@rom1v rom1v mentioned this issue Sep 15, 2024
3 tasks
@rom1v
Copy link
Collaborator

rom1v commented Sep 15, 2024

Implemented by #5270, released in scrcpy 2.7 🚀

@rom1v rom1v closed this as completed Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests