From 0b73cd384224e92b12716164adf0158909ab1041 Mon Sep 17 00:00:00 2001 From: AbdAlrahman Ghanem Date: Sat, 14 Dec 2024 20:44:40 +0200 Subject: [PATCH] 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处 - -