Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync dev #1103

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion QtScrcpy/util/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion config/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 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 All @@ -71,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)

15 changes: 14 additions & 1 deletion 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,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)
Loading