Skip to content

Commit

Permalink
feat: add configurable drag speed and delay
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
w4po authored and barry-ran committed Dec 20, 2024
1 parent ec5f413 commit 2f24524
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/KeyMapDes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/KeyMapDes_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
- key 要映射的按键码
- startPos 模拟触摸拖动的开始位置
- endPos 模拟触摸拖动的结束位置
- dragSpeed 拖动移动的速度(范围0-1,默认1.0)。数值越大,移动越快
- startDelay 可选的延迟时间(毫秒),在开始拖动移动之前等待指定的时间

- KMT_STEER_WHEEL
- centerPos 方向盘中心点
Expand All @@ -72,5 +74,3 @@
- upOffset 按下上方向键后模拟拖动到相对centerPos位置水平偏上upOffset处
- downOffset 按下下方向键后模拟拖动到相对centerPos位置水平偏下downOffset处



0 comments on commit 2f24524

Please sign in to comment.