moonlight-stream / moonlight-android

GameStream client for Android
GNU General Public License v3.0
4.3k stars 682 forks source link

[Feature request]: More operation when using touchScreen as trackpad #1312

Open y0sh1ne opened 10 months ago

y0sh1ne commented 10 months ago

Is your feature request related to a problem? Please describe.

When I use touchScreen as trackpad, I always frustrated about that I cannot use it just like the most of the real trackpad. It lacks some functions.

Describe the solution you'd like

I hope the functions below can be added to our application:

...

Describe alternatives you've considered

no

Screenshots

No response

odu14ick commented 9 months ago

I would like to confirm these features would be greatly appreciated. Especially the two-finger pinch zoom (in any mode trackpad or touchscreen). I'm using Moonlight on Nintendo Switch / LineageOS Android and even then the text is too small for my old eyes, so I'd ideally like to zoom into the items descriptions and such. Can't fathom how people on the actual Android phones can live without this crucial feature.

I tried looking around for feature suggestions and the closest one I found was this one: https://github.com/moonlight-stream/moonlight-android/issues/934

From it I figure the current state of things is that two-finger zoom is either conflicting with the pan or mouse scroll implementation. Neither are as critical (in my humble opinion) as being able to read the on-screen text and zoom back out quickly (or at all).

I would suggest having this as an option to switch between mouse scroll and two-finger zoom. Much like we have a set of option to switch between touchscreen / trackpad modes and so on.

Please let me know if I misunderstood this issue and it's not about adding two-finger zoom among other enhancments - I will open a separate one.

P.S: Obligatory "thank you" to the team for bringing this awesome piece of code around!

y0sh1ne commented 8 months ago

@odu14ick I think that's not exactly what I mean, but may also solve your needs.

We have touchscreen / trackpad modes(same with your opinion), and I would suggest making the screen to be a "real trackpad" when we choose the trackpad mode.

What's more, conflict between zoom and pan or mouse scroll may not exist -- they use completely different gestures.

This page may explain my opinion: https://support.microsoft.com/en-us/windows/touch-gestures-for-windows-a9d28305-4818-a5df-4e2b-e5590f850741

goooooouwa commented 4 months ago

Are we gonna be able to zoom to enlarge screen on Android? Currently there’s only an option to stretch the screen wider to fit the whole screen. I hope there’s a way to zoom in while preserving the aspect ratio of the content.

Thanks for your awesome work with Moonlight and Sunshine.

ClassicOldSong commented 4 months ago

Good lord I just implemented zooming and saw this issue been brought to front...

https://github.com/ClassicOldSong/moonlight-android/releases

Disable touch screen mouse mode to pan/zoom

@y0sh1ne yup, my version has a "real trackpad" mode

namelessnkz commented 4 months ago

@ClassicOldSong Thank you very much! This is exactly what you need, now you can zoom in on the image on your phone in order to see the small text and then reduce it back with a simple gesture. Fabulous!

odu14ick commented 4 months ago

@ClassicOldSong must be doing something terribly wrong here, but it doesn't work for me unfortunately. Trying to use in the scope of zooming-in to see small letters on Android.

My android is Nintendo Switch and my server is Sunshine. I have tried basically every Trackpad mode there is. I think the right one is "Disabled", judging from description.

Is it assumed that zooming-in is something Android and not moonlight client itself should manage? If so - that's probably where I got it wrong.

If it should be managed by Moonlight-noir, can you please let me know what diagnostics you need to troubleshoot it?

ClassicOldSong commented 4 months ago

@odu14ick I don't understand what you're talking about. The zoom feature is moved out from mouse mode in the latest build of my version into a dedicated feature.

To avoid conflict with other touch input, I made it when panning/zooming, the touch input will only respond to pan/zoom gestures.

What is the "terribly wrong" thing here and do you mean you're using android on a Nintendo Switch?

Zoom should and only will be handled by the client, in this case, Moonlight Noir.

If you want to use touchpad to zoom content on your host PC, it's not possible for now since Sunshine side don't have a touchpad emulation. Touchpad motions are translated to mouse movements on the Moonlight side then send to Sunshine.

odu14ick commented 4 months ago

@ClassicOldSong first of all, "terribly wrong" was about me misconfiguring Moonlight Noir, it's my very first experience with the Noir, so misconfiguration is perfectly possible. So not directed at you or the software at all. I appreciate your work even if some features don't work for me, that's expected in the world of software.

Going on, not sure what you mean by "moved out from mouse mode" but I was not able to find anything in the options that goes by the name of "pan" or "zoom". The only mention I saw was in the subtitle of the "Trackpad Mode" option, which mentioned that pan and zoom should work in the disabled mode.

And yes, I'm using android distribution for Nintendo Switch - it's LineageOS.

By the zoom not handled by the client - I meant that maybe the client is just supposed to disable control over mouse and zoom should be managed by the [Android] OS itself. Obviously, I don't expect the zoom to work on PC at all. Just mentioned Sunshine so you have a somewhat better idea of what my setup is.

Overall, I guess I'm just overlooking some obvious setting, but with the Trackpad Mode == disabled (or any other setting for that matter) no zoom or pan is possbile for me. Nothing heppens when I do the pinch or two finger scroll motion.

Hope I managed to explain what I mean.

ClassicOldSong commented 4 months ago

The latest version has zoom mode in the first level of back menu, it's not tied to the mouse mode anymore. I tested on all my devices and all of them work perfectly. The zoom is handled purely client side.

odu14ick commented 4 months ago

Back with the results. Thanks for mentioning the back menu. Didn't realize there was a separate one, with different options then the one with under the cog icon on the main screen. To make matters worse lineageOS had navbar disabled by default and i didn't guess the back gesture right originalky.

Anyway, happy to say everything works for me as well as it does for others. Great job! Can't express how much I appreciate you spending effort on this specific feature. It was the top feature in my wishlist for years!

Many thanks!

P.S. also if you have a "buy me a cofee" page, I would totally buy you a few.

ClassicOldSong commented 4 months ago

You're welcome, thanks for your appreciation!

But please don't donate, I just got kicked out from their discord for helping people out!

y0sh1ne commented 4 months ago

@ClassicOldSong , thanks for your work! I have tried your release, but some functions of trackpad have not been implemented. For detail, you can check this .Or if you are using Win11, click "Setting->Bluetooth->TouchPad" for detail.

ClassicOldSong commented 4 months ago

If you want to use touchpad to zoom content on your host PC, it's not possible for now since Sunshine side don't have a touchpad emulation. Touchpad motions are translated to mouse movements on the Moonlight side then send to Sunshine.

@y0sh1ne I have explained here about why they're not possible. This require modifications on Sunshine side as well.

And I have been banned from sunshine and moonlight's discord server literally for being able to help people solve issues not listed in the FAQ, I think we'd better switch to my fork repo to discuss this issue, as helping people here is an unwanted thing to do.