From 2f2452403b27a3c45dcfd57a0d14a0fb9444021a Mon Sep 17 00:00:00 2001 From: AbdAlrahman Ghanem Date: Sat, 14 Dec 2024 20:44:40 +0200 Subject: [PATCH 1/5] feat: add configurable drag speed and delay Added new features to drag functionality: - Added startDelay parameter to specify delay before drag movement - Added dragSpeed parameter to control movement speed - Updated documentation in both English and Chinese This allows users to fine-tune both the timing and speed of drag movements. --- QtScrcpy/QtScrcpyCore | 2 +- docs/KeyMapDes.md | 2 ++ docs/KeyMapDes_zh.md | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/QtScrcpy/QtScrcpyCore b/QtScrcpy/QtScrcpyCore index 8e2cc1f3b..cb9da00b4 160000 --- a/QtScrcpy/QtScrcpyCore +++ b/QtScrcpy/QtScrcpyCore @@ -1 +1 @@ -Subproject commit 8e2cc1f3b17ad888b567ce05c5fe125bcaca0dd5 +Subproject commit cb9da00b4ac4e855b6cb8a9033fe45a1fabfd05b diff --git a/docs/KeyMapDes.md b/docs/KeyMapDes.md index bd896cda1..c093e548e 100644 --- a/docs/KeyMapDes.md +++ b/docs/KeyMapDes.md @@ -60,6 +60,8 @@ Description of the unique attributes of different key mapping types: -key The key code to be mapped -startPos Simulate the start position of touch drag -endPos Simulate the end position of touch drag + -dragSpeed Speed of the drag movement (range 0-1, default 1.0). Higher values result in faster movements + -startDelay Optional delay in milliseconds to wait after the initial touch before starting the drag movement -KMT_STEER_WHEEL -centerPos steering wheel center point diff --git a/docs/KeyMapDes_zh.md b/docs/KeyMapDes_zh.md index 07669a0f1..a9f5a7fd7 100644 --- a/docs/KeyMapDes_zh.md +++ b/docs/KeyMapDes_zh.md @@ -60,6 +60,8 @@ - key 要映射的按键码 - startPos 模拟触摸拖动的开始位置 - endPos 模拟触摸拖动的结束位置 + - dragSpeed 拖动移动的速度(范围0-1,默认1.0)。数值越大,移动越快 + - startDelay 可选的延迟时间(毫秒),在开始拖动移动之前等待指定的时间 - KMT_STEER_WHEEL - centerPos 方向盘中心点 @@ -72,5 +74,3 @@ - upOffset 按下上方向键后模拟拖动到相对centerPos位置水平偏上upOffset处 - downOffset 按下下方向键后模拟拖动到相对centerPos位置水平偏下downOffset处 - - From d444f26282507d6c8f3a1a42c34ca5419183db19 Mon Sep 17 00:00:00 2001 From: AbdAlrahman Ghanem Date: Sun, 22 Dec 2024 02:28:43 +0200 Subject: [PATCH 2/5] docs: add ScrcpyKeyMapper tool to key mapping documentation --- docs/KeyMapDes.md | 15 +++++++++++++++ docs/KeyMapDes_zh.md | 13 +++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docs/KeyMapDes.md b/docs/KeyMapDes.md index c093e548e..3d83df990 100644 --- a/docs/KeyMapDes.md +++ b/docs/KeyMapDes.md @@ -73,3 +73,18 @@ Description of the unique attributes of different key mapping types: -rightOffset After pressing the right direction key, drag it to the right offset of the center to the right of the centerPos position -upOffset After pressing the up arrow key, drag it to the upper offset position horizontally relative to the centerPos position -downOffset Press the down arrow key and drag it to the downOffset position horizontally relative to the centerPos position + +## Visual Key Mapping Tool + +A web-based GUI tool is available to help you create and manage key mappings visually: [ScrcpyKeyMapper](https://github.com/w4po/ScrcpyKeyMapper) + +![ScrcpyKeyMapper Screenshot](https://raw.githubusercontent.com/w4po/ScrcpyKeyMapper/main/assets/screenshot.png) + +You can use this tool to: +- Create key mappings visually +- Test your mappings in real-time +- Export mappings as JSON files +- Import existing mappings for editing + +Try it online: [ScrcpyKeyMapper Web App](https://w4po.github.io/ScrcpyKeyMapper) + diff --git a/docs/KeyMapDes_zh.md b/docs/KeyMapDes_zh.md index a9f5a7fd7..3cace6feb 100644 --- a/docs/KeyMapDes_zh.md +++ b/docs/KeyMapDes_zh.md @@ -74,3 +74,16 @@ - upOffset 按下上方向键后模拟拖动到相对centerPos位置水平偏上upOffset处 - downOffset 按下下方向键后模拟拖动到相对centerPos位置水平偏下downOffset处 +## 可视化按键映射工具 + +现在有一个基于Web的GUI工具可以帮助你直观地创建和管理按键映射:[ScrcpyKeyMapper](https://github.com/w4po/ScrcpyKeyMapper) + +![ScrcpyKeyMapper截图](https://raw.githubusercontent.com/w4po/ScrcpyKeyMapper/main/assets/screenshot.png) + +你可以使用这个工具来: +- 直观地创建按键映射 +- 实时测试你的映射 +- 导出映射为JSON文件 +- 导入现有映射进行编辑 + +在线试用:[ScrcpyKeyMapper网页应用](https://w4po.github.io/ScrcpyKeyMapper) From e249c7c7adf6aebce9eb25834b1f067188d4ed25 Mon Sep 17 00:00:00 2001 From: rankun <870709864@qq.com> Date: Fri, 10 Jan 2025 16:32:12 +0800 Subject: [PATCH 3/5] feat: update scrcpy-server 3.1 --- QtScrcpy/QtScrcpyCore | 2 +- QtScrcpy/util/config.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/QtScrcpy/QtScrcpyCore b/QtScrcpy/QtScrcpyCore index cb9da00b4..665807285 160000 --- a/QtScrcpy/QtScrcpyCore +++ b/QtScrcpy/QtScrcpyCore @@ -1 +1 @@ -Subproject commit cb9da00b4ac4e855b6cb8a9033fe45a1fabfd05b +Subproject commit 665807285e74ce8e9316d33b3ae9f95acfb6f8e4 diff --git a/QtScrcpy/util/config.cpp b/QtScrcpy/util/config.cpp index 5915cf29e..43bcee079 100644 --- a/QtScrcpy/util/config.cpp +++ b/QtScrcpy/util/config.cpp @@ -18,7 +18,7 @@ #define COMMON_PUSHFILE_DEF "/sdcard/" #define COMMON_SERVER_VERSION_KEY "ServerVersion" -#define COMMON_SERVER_VERSION_DEF "2.1.1" +#define COMMON_SERVER_VERSION_DEF "3.1" #define COMMON_SERVER_PATH_KEY "ServerPath" #define COMMON_SERVER_PATH_DEF "/data/local/tmp/scrcpy-server.jar" From 4dd2e83ccd695e76fd6d265b1a753a395a574d88 Mon Sep 17 00:00:00 2001 From: rankun <870709864@qq.com> Date: Fri, 10 Jan 2025 17:59:30 +0800 Subject: [PATCH 4/5] feat: update config.ini server 3.1 --- config/config.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.ini b/config/config.ini index adb2bd3d7..a35cc0d45 100644 --- a/config/config.ini +++ b/config/config.ini @@ -10,7 +10,7 @@ RenderExpiredFrames=0 # 视频解码方式:-1 自动,0 软解,1 dx硬解,2 opengl硬解 UseDesktopOpenGL=-1 # scrcpy-server的版本号(不要修改) -ServerVersion=3.0.2 +ServerVersion=3.1 # scrcpy-server推送到安卓设备的路径 ServerPath=/data/local/tmp/scrcpy-server.jar # 自定义adb路径,例如D:/android/tools/adb.exe From 96776ed415549a4e8bbcb252657d09fe226e3865 Mon Sep 17 00:00:00 2001 From: barry <870709867@qq.com> Date: Sat, 11 Jan 2025 02:27:39 +0800 Subject: [PATCH 5/5] fix: record&screenshot failed on wireless device --- QtScrcpy/QtScrcpyCore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QtScrcpy/QtScrcpyCore b/QtScrcpy/QtScrcpyCore index 665807285..6beab5c96 160000 --- a/QtScrcpy/QtScrcpyCore +++ b/QtScrcpy/QtScrcpyCore @@ -1 +1 @@ -Subproject commit 665807285e74ce8e9316d33b3ae9f95acfb6f8e4 +Subproject commit 6beab5c967f7f77ddcfabe79757dc01202653ab7