You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can write your script to map keyboard and mouse actions to touches and clicks of the mobile phone according to your needs. [Here](docs/KeyMapDes.md) are the rules.
34
+
## Mapping Keys
35
+
You can write your script to map keyboard and mouse actions to touches and clicks of the mobile phone according to your needs. [Here](docs/KeyMapDes.md) are the script writing rules.
36
36
37
-
A script for "PUBG mobile" and TikTok mapping is provided by default. Once enabled, you can play the game with your keyboard and mouse as the PC version. or you can use up/down/left/right direction keys to simulate up/down/left/right sliding. You can also write your mapping files for other games according to [the writing rules](docs/KeyMapDes.md). The default key mapping is as follows:
37
+
Script for TikTok and some other games are provided by default. Once enabled, you can play the game with your keyboard and mouse. The default key mapping for PUBG Mobile is as follows:
38
38
39
39

40
40
41
-
[Here is a video demonstration of playing "PUBG mobile"](http://mp.weixin.qq.com/mp/video?__biz=MzU1NTg5MjYyNw==&mid=100000015&sn=3e301fdc5a364bd16d6207fa674bc8b3&vid=wxv_968792362971430913&idx=1&vidsn=eec329cc13c3e24c187dc9b4d5eb8760&fromid=1&scene=20&xtrack=1&clicktime=1567346543&sessionid=1567346375&subscene=92&ascene=0&fasttmpl_type=0&fasttmpl_fullversion=4730859-zh_CN-zip&fasttmpl_flag=0&realreporttime=1567346543910#wechat_redirect)
41
+
[Here is a video demonstration playing PUBG Mobile.](http://mp.weixin.qq.com/mp/video?__biz=MzU1NTg5MjYyNw==&mid=100000015&sn=3e301fdc5a364bd16d6207fa674bc8b3&vid=wxv_968792362971430913)
42
42
43
-
Here is the instruction for adding new customized mapping files.
43
+
Instruction for adding new customized mapping files.
44
44
45
45
- Write a customized script and put it in the `keymap` directory
46
-
- Click `refresh script` to check whether it can be found
46
+
- Click `refresh script` to show it
47
47
- Select your script
48
-
- Connect your phone, start service and click `apply`
49
-
- Press `~` key (left side of the number key 1) to switch to the custom mapping mode (It can be changed in the script as `switchkey`)
48
+
- Connect to your phone, start service and click `apply`
49
+
- Press `~` key (the SwitchKey in the key map script) to switch to custom mapping mode
50
50
- Press the ~ key again to switch back to normal mode
51
-
- (For PUBG and similar games) If you want to drive cars with WASD, you need to check the `single rocker mode` in the game setting.
51
+
- (For games such as PUBG Mobile) If you want to move vehicles with the STEER_WHEEL keys, you need to set the move mode to `single rocker mode`.
For Windows, for simplicity, prebuilt archives with all the dependencies (including ADB) are available:
107
+
On Windows, for simplicity, prebuilt archives with all the dependencies (including ADB) are available at Releases:
108
108
109
109
-[`QtScrcpy`][github-download]
110
110
111
-
or you can [build it by yourself](#Build)
111
+
or you can [build it yourself](#Build)
112
112
113
113
### Mac OS
114
-
For Mac OS, for simplicity, prebuilt archives with all the dependencies (including ADB) are available:
114
+
On Mac OS, for simplicity, prebuilt archives with all the dependencies (including ADB) are available at Releases:
115
115
116
116
-[`QtScrcpy`][github-download]
117
117
118
-
or you can [build it by yourself](#Build)
118
+
or you can [build it yourself](#Build)
119
119
120
120
### Linux
121
-
you can [build it by yourself](#Build)(just ubuntu test)
121
+
For Arch Linux Users, you can use AUR to install: `yay -Syu qtscrcpy` (may be outdated; maintainer: [yochananmarqos](https://aur.archlinux.org/account/yochananmarqos))
122
122
123
+
For users in other distros, you can use the prebuilt archives from Releases:
124
+
125
+
-[`QtScrcpy`][github-download]
126
+
127
+
or you can get it at [GitHub Actions](https://github.com/UjhhgtgTeams/QtScrcpy/actions/workflows/ubuntu.yml), in branch `dev` and download the latest artifact.
128
+
129
+
or you can [build it yourself](#Build) (not recommended, get it in Actions if you can)
123
130
124
131
## Run
125
132
Connect to your Android device on your computer, then run the program and click `USB connect` or `WiFi connect`
@@ -176,10 +183,9 @@ Note: it is not necessary to keep your Android device connected via USB after yo
176
183
It is possible to synchronize clipboards between the computer and the device, in
177
184
both directions:
178
185
179
-
-`Ctrl`+`c` copies the device clipboard to the computer clipboard;
180
-
-`Ctrl`+`Shift`+`v` copies the computer clipboard to the device clipboard;
181
-
-`Ctrl`+`v`_pastes_ the computer clipboard as a sequence of text events (but
182
-
breaks non-ASCII characters).
186
+
-`Ctrl + c` copies the device clipboard to the computer clipboard;
187
+
-`Ctrl + Shift + v` copies the computer clipboard to the device clipboard;
188
+
-`Ctrl + v`_pastes_ the computer clipboard as a sequence of text events (non-ASCII characters does not yet work).
183
189
- Group control
184
190
- Sync device speaker sound to the computer (based on [sndcpy](https://github.com/rom1v/sndcpy), Android 10+ only)
185
191
@@ -222,39 +228,44 @@ _³Only on Android >= 7._
222
228
[DEVELOP](docs/DEVELOP.md)
223
229
224
230
Everyone is welcome to maintain this project and contribute your own code, but please follow these requirements:
225
-
1.pr please mention the dev branch, not the master branch
226
-
2. Please rebase dev before mentioning pr
227
-
3.pr please submit on the principle of a small number of times (a small function point is recommended to mention a pr)
228
-
4. Please keep the code style consistent with the existing style
231
+
1.Please open PRs to the dev branch instead of the master branch
232
+
2. Please rebase the original project before opening PRs
233
+
3.Please submit PRs on the principle of "small amounts, many times" (one PR for a change is recommended)
234
+
4. Please keep the code style consistent with the existing style.
229
235
230
236
## Why develop QtScrcpy?
231
237
There are several reasons listed below according to importance (high to low).
232
-
1. In the process of learning Qt, I need a real project to try
233
-
2. I have some background skills in audio and video and I am interested in them
238
+
1. In the process of learning Qt, I need a real project to try.
239
+
2. I have some background skills in audio and video and I am interested in them.
234
240
3. I have some Android development skills. But I have used it for a long time. I want to consolidate it.
235
-
4. I found scrcpy and decided to re-make it with the new technology stack (C++ + Qt + Opengl + FFmpeg)
241
+
4. I found scrcpy and decided to re-make it with the new technology stack (C++ + Qt + Opengl + FFmpeg).
236
242
237
243
238
244
## Build
239
245
All the dependencies are provided and it is easy to compile.
240
246
241
-
### PC client
242
-
1. Set up the Qt development environment on the target platform.
243
-
Qt version>=5.12 (use MSVC 2019 on Windows)
244
-
2. Clone the project (git clone --recursive [email protected]:barry-ran/QtScrcpy.git)
245
-
3. Open the project root directory `CMakeLists.txt` with QtCreator
246
-
4. Compile and run
247
-
248
-
### Android (If you do not have special requirements, you can directly use the built-in scrcpy-server.jar)
249
-
250
-
1. Set up an Android development environment on the target platform
247
+
### QtScrcpy
248
+
#### Non-Arch Linux Users
249
+
1. Set up the Qt development environment with the official Qt installer or third-party tools such as [aqt](https://github.com/miurahr/aqtinstall) on the target platform.
250
+
Qt version bigger than 5.12 is required. (use MSVC 2019 on Windows)
251
+
2. Clone the project with `git clone --recurse-submodules https://barry-ran/QtScrcpy.git`
252
+
3. For Windows, open CMakeLists.txt with QtCreator and compile Release
253
+
4. For Linux, directly run `./ci/linux/build_for_linux.sh "Release"`
254
+
Note: compiled artifacts are located at `output/x64/Release`
2. Clone the project with `git clone --recurse-submodules https://barry-ran/QtScrcpy.git`
259
+
3. Run `./ci/linux/build_for_linux.sh "Release"`
260
+
261
+
### Scrcpy-Server
262
+
1. Set up Android development environment on the target platform
251
263
2. Open server project in project root with Android Studio
252
-
3. The first time you open it, if you do not have the corresponding version of Gradle, you will be prompted to find Gradle, whether to upgrade Gradle or create it. Select Cancel. After canceling, you will be prompted to select the location of the existing Gradle. You can also cancel it (it will download automatically).
253
-
4. Edit the code as needed, but of course, you don’t need to.
264
+
3. The first time you open it, if you do not have the corresponding version of Gradle, you will be prompted to find Gradle, whether to upgrade Gradle or create it. Select Cancel. After cancelling, you will be prompted to select the location of existing Gradle. Cancel it too and it will download automatically.
254
265
4. After compiling the apk, rename it to scrcpy-server and replace QtScrcpy/QtScrcpyCore/src/third_party/scrcpy-server.
255
266
256
267
## Licence
257
-
Since it is based on scrcpy, respect its Licence
268
+
Since it is based on scrcpy, it uses the same license as scrcpy
0 commit comments