QtScrcpy: The C++ Power Tool for Controlling Android Phones with Keyboard and Mouse

12 views 0 likes 0 comments 14 minutesOriginalOpen Source

Discover QtScrcpy, a lightweight, high-performance open-source tool that lets you control your Android device from your computer using keyboard and mouse. Built with C++, Qt, and OpenGL, it delivers smooth 30-60fps mirroring with ultra-low latency (35-70ms), supports USB/Wi-Fi connections, multi-device control, and requires no app installation on the phone. A must-have for developers, gamers, and productivity enthusiasts.

#C++ # Qt # Android # Screen Mirroring # Development Tools # Productivity
QtScrcpy: The C++ Power Tool for Controlling Android Phones with Keyboard and Mouse

Hey folks, today let's put Java aside and dive into something fresh — after eight long years of being tortured by Spring Boot and MyBatis, this old coder finally found that elusive 'buttery-smooth' feeling again… in a C++ project! Yes, I'm talking about QtScrcpy, a magical tool that lets you control your Android phone with a mouse and keyboard. It’s like giving your phone an external 'cyber brain'.

Let me explain why I’m so intrigued. As someone who spends all day dealing with REST APIs and microservices, I’ve always kept my distance from GUI development. But QtScrcpy is different — it solves such a down-to-earth problem: ever tried replying to a WeChat message on your PC, only to stretch across the desk to grab your charging phone? Or played mobile games where your clumsy fingers keep mis-tapping? This thing literally moves your phone screen onto your monitor and lets you operate it with precision input devices. It’s the Swiss Army knife of productivity tools.

From a technical standpoint, this project stands firmly on the shoulders of giants. It builds upon Genymobile’s scrcpy, but replaces the original SDL UI with Qt + OpenGL. Think of it as upgrading a clunky manual transmission hatchback into a smart EV with self-parking and HUD display. Qt’s cross-platform magic means it runs seamlessly on Windows, macOS, and Linux, while OpenGL rendering ensures buttery-smooth 30–60 FPS performance. The official claim of 35–70ms latency is no joke — even 1080p over USB feels effortless. Honestly, this performs better than half the internal admin dashboards at my company (and yes, I laughed too).

The architecture design is also quite clever. At its core lies Qt’s asynchronous signal-slot mechanism — their secret sauce. Imagine video streaming from your phone as a continuous assembly line (the video stream), while your mouse clicks are like sudden command packets thrown onto the belt. Qt’s signal-slot system acts like an intelligent robotic sorter, precisely injecting those commands between corresponding video frames — ensuring instant response without disrupting playback smoothness. This beats traditional synchronous blocking models hands down, avoiding that annoying 'nothing happens... then suddenly everything floods in' scenario.

What truly blew my mind was its 'lightweight' philosophy. No apps needed on the phone — it relies entirely on the ADB debugging protocol. Launch it, and within one second, your screen appears. It’s like incognito mode: use it and go, clean and lean. Compare that to some domestic screen-mirroring software that demands endless permissions and bundles a whole suite of unwanted apps — digital-age spam at its worst.

Of course, as a fellow developer, I should point out a few nits. The author aggressively promotes his commercial product QuickMirror and paid courses in the README. While I get the need to monetize, it feels a bit like constant ad breaks during a tech talk — slightly too salesy. Also, the project lacks standard package manager support (no Homebrew formula or APT repo), forcing manual download of ZIP files. For us automation lovers, that’s a minor UX downgrade.

Now, let’s talk use cases — this tool is tailor-made for specific crowds:

  • Mobile gamers: Play Genshin Impact or Honor of Kings with keyboard and mouse on a big screen — superior field of view and pixel-perfect control. Once you try it, there’s no going back.
  • Android developers: Test UI and interactions without constantly picking up your physical device — a true wrist-saver.
  • Multi-device managers: Supports batch control. Picture controlling a wall of phones for automated testing — pretty epic.
  • Content creators: Stream gameplay or record tutorials without fumbling with cameras.

How hard is it to use? For regular users: download, unzip, double-click — even a primary schooler could do it. Want to hack it? You can write custom key mappings (like the cool default PUBG Mobile layout mentioned in the README) using JSON scripts. But don’t worry — the author provides QuickAssistant, a visual editor, to lower the barrier.

If I were using this, beyond daily mirroring, I’d definitely integrate it into my workflow. When writing blog posts, I could directly capture phone screenshots from my PC. Or pair it with automation scripts to batch-process repetitive phone tasks. Is it worth diving deep into the code? Absolutely — if you're interested in video codecs or cross-platform GUI development. The way it uses FFmpeg to decode H.264 streams and renders them via OpenGL into a Qt window is a masterclass in systems programming. Even if you don’t study the code, as a tool in your arsenal, it’s pure value.

In short, QtScrcpy proves that great open-source projects don’t need to revolutionize the world. Nail one thing, solve a real 'small pain', and you can earn 27,714 stars. That’s far more impressive than those 'cloud-only' projects that just draw fancy architecture diagrams.

Key Features

  • Real-time display and control of Android devices
  • Supports both USB and Wi-Fi wireless connections
  • Ultra-low latency (35~70ms), high performance (30~60fps)
  • Multi-device connection and batch control supported
  • No app installation required on Android device

Tech Stack

  • C++
  • Qt
  • OpenGL
  • FFmpeg
  • ADB

Installation

Windows / Mac OS / Linux

  • Download pre-built binaries: Releases
  • Or install via AUR (Arch Linux):
    bash 复制代码
    yay -Syu qtscrcpy

Quick Start

Running Steps

  1. Enable [ADB debugging][enable-adb] on your Android device
  2. Connect the device to your computer via USB
  3. Run the QtScrcpy program
  4. Click USB connect
  5. Click Start service

Wireless Connection Steps (ensure same local network)

  1. Connect device via USB
  2. Click Update device
  3. Click Get device IP
  4. Click Start adbd
  5. Click Wireless connect
  6. Click Update device again and select the IP device
  7. Click Start service

Advanced Usage

Custom Key Mapping (Keymap)

  1. Create a custom script file under the keymap directory
  2. Click refresh script to reload
  3. Select the script, click apply after connecting the device
  4. Press the ~ key to switch to custom mapping mode

Common Shortcuts

Action Shortcut (Windows)
Fullscreen Ctrl+f
HOME key Ctrl+h
BACK key Ctrl+b
Volume Up Ctrl+
Screenshot Ctrl+c (copied to clipboard)
Paste PC text to phone Ctrl+Shift+v
Turn off phone screen (keep mirroring) Ctrl+o

Startup Configuration

  • Resolution, bitrate, recording format, and save path can all be set in Start config
  • Supports background recording (Background record) and always-on-top window (Always on top)
Last Updated:

Comments (0)

Post Comment

Loading...
0/500
Loading comments...