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

[Feature] Fake Touch at cursor Location when a specific Keyboard Key is pressed #98

Open
lastMove opened this issue Mar 9, 2023 · 1 comment

Comments

@lastMove
Copy link
Contributor

lastMove commented Mar 9, 2023

Is your feature request related to a problem?

Yes, On some games like RL Sideswipe when we try to mouse click on some buttons or UI elements in the game interface. It makes the UI crash.
Issue already described here PlayCover/PlayCover#401 by @amirsaam

However it does not crash when we do a Touch tap. We can do that using Apple's "Touch Alternative settings" but it's very annoying, since you don't know where you tap, you have to guess and try many times. and if you fail at guessing it can click on some other element...

To overcome this I created a Keymap just to navigate in the menu and interface of RL sideswipe.

Describe the solution you'd like

Fake Touch on Mouse Location when we tap a specific key for instance 'n'.

When the user press 'n' we trigger a FakeTouch on the current location of the cursor.
We would have a settings for enabling this.

This would make the keymap I created Useless and with the addition of Playchain and #88 the support of RL sideswipe would be absolutely complete!

Anything else?

I actually already implemented a quick and Dirty version of this on top of @XuYicong work on #88 and it works well, I use it.

The code looks like this:

    func fakeTouchOnCursorLocation(pressed: Bool) {
        guard let cursorLocation = PlayMice.shared.cursorPos() else {
            return
        }
        debugPrint(cursorLocation)
        
        PlayInput.touchQueue.async(qos: .userInteractive) {
            Toucher.touchcam(point: cursorLocation, phase: pressed ? .began : .ended, tid: &self.cacheTidForFakeTouchOnCursor)
        }
    }

lastMove@a6275b5

I don't know if it would be useful for other games though.

Issue Language

Yes my issue is written in English

@github-daniel-mcdonald
Copy link

Would greatly appreciate this, as I play rlss on mac and the menu thing is killing me.

Can manage to join games but everything else (e.g. training mode) is nearly impossible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants