@@ -111,23 +111,23 @@ input.tap(s.width / 2, s.height / 2);
111111
112112#### ` input.touchDown(x, y, fingerID?, displayId?) `
113113
114- 模拟触摸按下。兼容 AutoGo 风格签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
114+ 模拟触摸按下。兼容常见脚本签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
115115
116116``` javascript
117117input .touchDown (500 , 600 , 0 , 0 );
118118```
119119
120120#### ` input.touchMove(x, y, fingerID?, displayId?) `
121121
122- 模拟触摸移动。兼容 AutoGo 风格签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
122+ 模拟触摸移动。兼容常见脚本签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
123123
124124``` javascript
125125input .touchMove (550 , 650 , 0 , 0 );
126126```
127127
128128#### ` input.touchUp(x, y, fingerID?, displayId?) `
129129
130- 模拟触摸抬起。兼容 AutoGo 风格签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
130+ 模拟触摸抬起。兼容常见脚本签名 ,但当前仅支持 ` fingerID = 0 ` 与 ` displayId = 0 ` 。** 返回:** ` boolean `
131131
132132``` javascript
133133input .touchUp (550 , 650 , 0 , 0 );
@@ -203,7 +203,7 @@ input.drag(200, 300, 200, 500, 0.5);
203203
204204#### ` input.swipe2(fromX, fromY, toX, toY, duration?) `
205205
206- AutoGo 兼容别名。当前实现仍然复用 ` swipe ` 的线性轨迹,不是贝塞尔曲线。** 返回:** ` boolean `
206+ 兼容别名。当前实现仍然复用 ` swipe ` 的线性轨迹,不是贝塞尔曲线。** 返回:** ` boolean `
207207
208208``` javascript
209209input .swipe2 (300 , 800 , 300 , 200 , 0.5 );
@@ -314,19 +314,24 @@ input.pressButtons(["volumeUp", "volumeDown"]);
314314
315315> 内部实现:按序发送所有 key down 事件 → 保持 150ms → 反序发送所有 key up 事件。
316316
317- ### AutoGo 风格系统动作
317+ ### 系统动作
318+ 已恢复映射:
319+ ` home ` 、` recents ` 以及 ` keyAction() ` 中的部分 keycode 采用文档 [ ios-hid-input-analysis.md] ( /Users/dompling/Desktop/GIT/TrollScript/docs/ios-hid-input-analysis.md ) 中已恢复出的 iOS 映射。
320+
321+ 平台扩展:
322+ ` back ` 、` notifications ` 、` quickSettings ` 、` camera ` 、` powerDialog ` 属于当前工程的 iOS 平台扩展动作,不代表已恢复出的参考实现一定使用同一路径。
318323
319324#### ` input.home(displayId?) `
320325
321- 使用 iOS 上滑手势近似返回主屏 。当前仅支持 ` displayId = 0 ` 。** 返回:** ` boolean `
326+ 当前实现使用 Home 键仿真方式返回主屏 。当前仅支持 ` displayId = 0 ` 。** 返回:** ` boolean `
322327
323328#### ` input.back(displayId?) `
324329
325330使用 iOS 左缘返回手势近似执行返回动作。当前仅支持 ` displayId = 0 ` 。** 返回:** ` boolean `
326331
327332#### ` input.recents(displayId?) `
328333
329- 使用 iOS 上滑并停留手势近似打开多任务界面 。当前仅支持 ` displayId = 0 ` 。** 返回:** ` boolean `
334+ 当前实现使用「双击 Home」近似打开多任务界面 。当前仅支持 ` displayId = 0 ` 。** 返回:** ` boolean `
330335
331336#### ` input.notifications() `
332337
@@ -346,14 +351,17 @@ input.pressButtons(["volumeUp", "volumeDown"]);
346351
347352#### ` input.keyAction(code, displayId?) `
348353
349- 按 AutoGo/Android 风格 keycode 执行对应动作。当前只支持部分常见按键,且仅支持 ` displayId = 0 ` 。** 返回:** ` boolean | object `
354+ 按兼容 keycode 执行对应动作。当前只支持部分常见按键,且仅支持 ` displayId = 0 ` 。** 返回:** ` boolean | object `
350355
351356常用常量:
352357
353358``` javascript
354359input .KEYCODE_HOME
355360input .KEYCODE_BACK
361+ input .KEYCODE_SEARCH
356362input .KEYCODE_ENTER
363+ input .KEYCODE_ESCAPE
364+ input .KEYCODE_FORWARD_DEL
357365input .KEYCODE_VOLUME_UP
358366input .KEYCODE_VOLUME_DOWN
359367input .KEYCODE_NOTIFICATION
@@ -420,7 +428,8 @@ console.log("开始录制,请在屏幕上操作...");
420428| 位移 < 10pt 且时间 < 300ms | ` input.tap(x, y) ` |
421429| 位移 < 10pt 且时间 >= 500ms | ` input.longPress(x, y, duration) ` |
422430| 位移 >= 10pt | ` input.swipe(fromX, fromY, toX, toY, duration) ` |
423- | 多指/复杂轨迹/长时轨迹 | ` input.touchDown/move/up(...) ` 原始回放 |
431+ | 单指复杂轨迹/长时轨迹 | ` input.touchDown/move/up(...) ` 原始回放 |
432+ | 多指轨迹 | 仅返回 warning,脚本中写入省略注释,不自动生成多指回放 |
424433| 手势间隔 > 50ms | 插入 ` util.sleep(interval) ` |
425434
426435``` javascript
0 commit comments