PlayCover / PlayCover/PlayTools

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

Open
#98 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
111
Forks
145
Avg merge
12d 8h
Merged PRs (30d)
3

Description

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 https://github.com/PlayCover/PlayCover/issues/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)
        }
    }

https://github.com/lastMove/PlayTools/commit/a6275b579e99b923a7d2423c6ffdcdf06c0bb326

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

Issue Language

Yes my issue is written in English

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mentioned PlayMice.shared.cursorPos, PlayInput.touchQueue, and Toucher.touchcam entry points, then review the keymapping work in #88 and the referenced commit. The feature is done when a configurable key press and release generates a touch at the current cursor location without requiring the existing keymap.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.