moonlight-ios icon indicating copy to clipboard operation
moonlight-ios copied to clipboard

Native touch passthrough, better keyboard toggle, better remote typing, anti-unexpected-session-exit & touchpoint velocity (sensitivity) tweak

Open TrueZhuangJia opened this issue 8 months ago • 2 comments

  • Robust native multi-touch pass-through.

    testt5

  • Stream view lifting for local keyboard, prevent remote typing view from being blocked by local keyboard:

    I did this because iOS floating keyboard sucks. image ViewliftExplained - Copy Use Gesture to let the software know where the remote input field is, then stream view will be lifted appropriately (not going to be covered by keyboard). Here's a gif example: testt7

  • Refactored tap gesture recognition for reliable local keyboard toggle.

    The official version of Moonlight-iOS triggers the local keyboard switch when it detects three touch points on the screen, a mechanism that makes three-point dragging completely ineffective.
    I also tried UITapGestureRecognizer provided by iOS native API: the success rate of gesture recognition would decrease, and even continuous failures could occur. Therefore, I rewrote a TapGestureRecognizer with a recognition rate of almost 100% that does not affect multi-point dragging. To prevent local keyboard from being invoked unexpectedly, I add the required number of fingers for tap recognizer to the setting menu. It is recommended to set 3-finger triggering on phones and 4 or more on tablets (as your palm might touch the screen, forming a third touch point when using a tablet). image Here's a *.gif example of setting "Fingers to Tap" to 4 on my ipad mini6: testt5

  • Configurable local keyboard toolbar:

    image

  • Touch Pointer Velocity (Sensitivity) Tweak

    image The pointer velocity tweak zone is on the right side of screen with configurable width, while on the rest part of screen, original coordinates of pointer will be passed through to the remote PC.
    Useful for tweaking view rotation in native touch games. testt6

  • Refactored Session Exit Gesture Recognition to Prevent Accidental Exits.

    Due to the Mihoyo game UI's directional wheel on the left being close to the screen edge, the original exit gesture recognition was frequently triggered during intense touch operations. You cannot imagine the despair of suddenly exiting from desktop in the Genshin Impact Spiral Abyss. I had to write a recognizer myself to replace the iOS native API, requiring a swipe from the screen edge to a certain distance to trigger the exit to the desktop. The trigger threshold for the swipe distance and which edge to start the swipe from have been added to the settings menu: image longSwipeToExit

  • Improved Mouse Right Click & Wheel Scroll Gesture in Trackpad (Relative Touch) Mode

    In original version, both right click & wheel scroll are triggered by 2 finger gesture, causes competing. Right click could fail and result in unexpected move of scroll view. This is resolved by utilizing my CustomTapGestureRecognizer, and a time threshold mechnism to prevent the 2 gestures from competing each other.

TrueZhuangJia avatar Jun 01 '24 09:06 TrueZhuangJia