chiaki icon indicating copy to clipboard operation
chiaki copied to clipboard

Mouse Support [Feature Request]

Open natealx opened this issue 4 years ago • 7 comments

Please add support for binding mouse movement on the right analog stick.

natealx avatar Apr 28 '20 22:04 natealx

This is my dream, to be able to play remote play with keyboard + mouse. I would love to contribute to this project and try to implement this feature. Any general tips/directions to going about this?

liorbrauer avatar May 13 '20 16:05 liorbrauer

Well first of all you would have to capture the mouse input in StreamWindow. Then map the absolute input from the mouse cursor to the relative input on the analog stick. This will be particularly tricky because of how different games may configure sensitivity, acceleration and deadzones, so these parameters should be configurable. I'm curious whether it will be possible to get the mouse feeling good enough that it is really worth playing this way.

thestr4ng3r avatar May 13 '20 18:05 thestr4ng3r

Oh valid point. Is there any conceptual way to get PS4 to treat the mouse input AS a mouse input? Or would we have to get the route of mapping mouse input -> analog stick input?

liorbrauer avatar May 13 '20 19:05 liorbrauer

I am not aware of any. The only input method we have is specific to the Dualshock 4 layout. But even if the protocol supported mouse input, the games would have to support it as well, which they don't.

thestr4ng3r avatar May 14 '20 08:05 thestr4ng3r

@thestr4ng3r Is it normal that Chiaki forces to use Mouse&Keyboard? Because since the update I can only use M&K, if I try to connect my controller to my PS4, the Chiaki session quits.

xXSkyWalkerXx1 avatar May 16 '20 10:05 xXSkyWalkerXx1

@thestr4ng3r Is it normal that Chiaki forces to use Mouse&Keyboard? Because since the update I can only use M&K, if I try to connect my controller to my PS4, the Chiaki session quits.

@xXSkyWalkerXx1 if you try connecting the controller to your PS4, then the PS4 sees a local sign in to the PSN account and kicks the remote session. The same thing would happen if you used the official PS4 Remote Play client software. You would have to connect the DS4 controller to the PC and map the controller to use the controller and keep the disconnect from happening.

hyukishi avatar Jul 06 '20 16:07 hyukishi

I think I'm going to take a stab at getting WASD/mouse support into chiaki. What I'm thinking is that if we don't see any valid SDL controllers then to use SDL_GetRelativeMouseState instead for right joystick. I'd also like to modify the settings to get mouse buttons as bindable and maybe even a sensitivity adjustment for the mouse.

Any thoughts before I get cracking?

mynameisfiber avatar Nov 28 '20 00:11 mynameisfiber