Go to file
2024-05-20 08:16:54 +08:00
.github Create pull_request_template.md 2024-05-02 16:09:06 +08:00
public feat(icon): new icon 2024-04-15 08:29:39 +08:00
src fix(applyEditKeyMappingList): ts error 2024-05-19 11:26:49 +08:00
src-tauri Scrcpy Mask v0.3.1 2024-05-20 08:04:41 +08:00
.gitignore init 2024-04-13 08:32:42 +08:00
index.html init 2024-04-13 08:32:42 +08:00
LICENSE Create LICENSE 2024-04-15 21:15:42 +08:00
package.json Scrcpy Mask v0.3.1 2024-05-20 08:04:41 +08:00
publish.js Scrcpy Mask v0.1.1 2024-05-02 08:44:01 +08:00
README-zh.md Update README-zh.md 2024-05-19 18:13:26 +08:00
README.md Update README.md 2024-05-19 18:12:58 +08:00
tsconfig.json migration from v1 2024-04-13 09:53:41 +08:00
tsconfig.node.json init 2024-04-13 08:32:42 +08:00
vite.config.ts init 2024-04-13 08:32:42 +08:00

Scrcpy-mask

中文介绍

To achieve computer control of Android devices, I developed a cross-platform desktop client using Tarui + Vue 3 + Rust. This client provides visual mouse and keyboard mapping configuration, enabling multi-touch operations similar to Android emulators through key mapping, with millisecond-level response time. This tool can be widely used for controlling Android devices from computers to play mobile games, providing a smooth touch experience.

This project only implements the Scrcpy control protocol and does not provide Screen mirroring. Because screen mirroring may involve latency and blurriness issues, this project takes a different approach by directly abandoning screen mirroring and instead using a transparent mask to display the content behind the window (which can be AVD, low-latency screen mirroring provided by your phone manufacturers, etc.), Completely eliminates the problem of poor screen casting experience inherent in Scrcpy.

Features

  • Wired and wireless connections to Android devices
  • Start scrcpy-server and connect to it
  • Implement scrcpy client control protocol
  • Mouse and keyboard key mapping
  • Visually setting the mapping
  • Key mapping config import and export
  • Update check
  • Switch between key mapping and input-text box
  • Internationalization (i18n)
  • Gamepad key mapping
  • Better macro support
  • Provide external control through websocket, see external control
  • Help document

Demonstration video

Implementation principle

Screenshot

  • Device control

  • Key mapping setting

  • Mask above game

Basic using

  1. Install software suitable for your system platform from releases
  2. Identify your Android device type
    1. For physical devices like phones or tablets
      1. You need to solve the problem of screen casting on your own. Recommend using the official screen mirror method of your device brand to achieve the minimum delay
      2. Enable ADB debugging on your device via USB or wirelessly, then connect it to your computer.
    2. For emulator, you don't need screen mirror, and emulator generally default to enabling ADB wired debugging. So this is the best way for game, I think.
  3. Launch the software and navigate to the Device page.
    1. Find your device among the available devices (if not found, please search for how to enable ADB debugging for your device).
    2. Right-click on your device and choose "Get Screen Size". Use the obtained screen size as a reference and enter the device's width and height correctly. Note: If the width or height is incorrect (for example, they are reversed in portrait and landscape modes), all touch operations will be ignored, but no error message will appear.
    3. Right-click on your device again and choose "Control this device".
  4. Navigate to the Settings page -> Mask Settings, and set the width and height of the mask to a certain multiple of the device's size to ensure the mask size is appropriate.
  5. Navigate to the Mask page where you can see a transparent mask. Next, adjust and move your emulator window or screen mirroring window to align the displayed content area with the transparent mask area.
  6. Navigate to the Key mapping page and switch or edit the key mapping configs.
  7. Return to the Mask page and start enjoying.

Contribution.

If you are interested in this project, you are welcome to submit pull request or issue. But my time and energy is limited, so I may not be able to deal with it all.

Star History Chart