Feature: Support remote clipboard and input on Android hosts
The MCP remote-control family (remote_open / remote_close / remote_mouse / remote_keyboard / remote_clipboard) previously stopped at Windows and Linux, even though the Android client already translated injected events into touch gestures and global actions. This wires up the missing piece and opens the five tools to APK hosts. Client side, the screen sub-connection now handles COMMAND_SCREEN_SET_CLIPBOARD: the native handler forwards the raw GBK bytes to CaptureService.onClipboardText, which decodes them, strips the trailing NUL that the human clipboard-sync senders append, and writes the system clipboard from a background app (allowed on Android 10+, only reads are restricted). Pasting cannot be a Ctrl+V combo, so VK_V is mapped to ACTION_PASTE on the focused node, falling back to the accessibility focus and then to the first editable node, since WebView and self-drawn inputs often do not flag FOCUS_INPUT or isEditable. A new capability bit CLIENT_CAP_SCREEN_CLIPBOARD (0x0800) tells the server the APK understands both paths, so builds without the handler get an explicit -32005 instead of a package that is silently dropped. action=type is rejected outright for APK hosts - physical key events would only turn 'v' into a paste - and the error points at remote_clipboard + key=V. The platform table, server instructions and the five tool descriptions now describe Android support, which keys actually act as global actions (ESC, HOME, APPS, PRINTSCREEN), and that injection needs the accessibility service while capture needs an authorized MediaProjection session, both without receipts. Verified on the API 35 emulator against a Debug server: ASCII and GBK Chinese text round-tripped through the clipboard into a focused Settings search field, type / expect_hwnd / window_hwnd returned -32005, and PRINTSCREEN produced a saved screenshot. check_platform_table.py and verify_tools.py --offline pass. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
ac43ad92ef
commit
0a0b709e8a
9 files changed
+351
-179
No files matched your search
+160
-155
@@ -456,7 +456,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"remoteControl": {
|
||||
"description": "能否建立远程控制会话(remote_open/remote_mouse/remote_keyboard 的前提);还要求服务端 Web 远程服务已启动(WebSvrPort>0)",
|
||||
"description": "能否建立远程控制会话(remote_open/remote_mouse/remote_keyboard 的前提);Android 客户端只支持整屏目标,且需要已授权录屏与无障碍服务;还要求服务端 Web 远程服务已启动(WebSvrPort>0)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"screenPreview": {
|
||||
@@ -1171,69 +1171,68 @@
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "主机 id,取 list_online_hosts / search_hosts 返回的 id 字段"
|
||||
"description": "主机 id,取 list_online_hosts / search_hosts 返回的 id 字段",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"outputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"window": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"properties": {
|
||||
"hwnd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pid": {
|
||||
"type": "integer"
|
||||
},
|
||||
"left": {
|
||||
"type": "integer"
|
||||
},
|
||||
"top": {
|
||||
"type": "integer"
|
||||
},
|
||||
"right": {
|
||||
"type": "integer"
|
||||
},
|
||||
"bottom": {
|
||||
"type": "integer"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer"
|
||||
},
|
||||
"height": {
|
||||
"type": "integer"
|
||||
},
|
||||
"zOrder": {
|
||||
"hwnd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
"isForeground": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"visible": {
|
||||
"left": {
|
||||
"type": "integer"
|
||||
},
|
||||
"maximized": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"minimized": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"maximized": {
|
||||
"pid": {
|
||||
"type": "integer"
|
||||
},
|
||||
"right": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"top": {
|
||||
"type": "integer"
|
||||
},
|
||||
"visible": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isForeground": {
|
||||
"type": "boolean"
|
||||
"width": {
|
||||
"type": "integer"
|
||||
},
|
||||
"zOrder": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"windowCount": {
|
||||
"type": "integer"
|
||||
@@ -1242,7 +1241,8 @@
|
||||
"required": [
|
||||
"window",
|
||||
"windowCount"
|
||||
]
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2327,12 +2327,13 @@
|
||||
},
|
||||
{
|
||||
"name": "remote_open",
|
||||
"description": "在指定在线 Windows 或 Linux 主机上建立远程控制会话(隐藏屏幕子连接)并返回 session_id、抓屏帧尺寸(screen_w/screen_h)与目标(target)。默认推整屏/整虚拟桌面(可能等比缩放);可用 window_hwnd 只推一个窗口,或用 region 只推一个矩形区域,带宽、延迟和点击精度都更好,此时归一化坐标 0..1 相对该目标帧。后续 remote_mouse/remote_keyboard 用归一化坐标(0..1)注入输入,用毕须 remote_close。Linux 需要 X11/Xorg(或 XWayland)桌面,纯 Wayland 会话无法抓屏/注入;window_hwnd/region 仅支持声明 CLIENT_CAP_WINDOW_INFO 的新 Windows 客户端。Windows 多显示器下整屏目标需要新版客户端(整虚拟桌面抓屏),老客户端会被拒绝;window 目标不依赖虚拟桌面抓屏,不受此限。",
|
||||
"description": "在指定在线 Windows、Linux 或 Android 主机上建立远程控制会话(隐藏屏幕子连接)并返回 session_id、抓屏帧尺寸(screen_w/screen_h)与目标(target)。默认推整屏/整虚拟桌面(可能等比缩放);可用 window_hwnd 只推一个窗口,或用 region 只推一个矩形区域,带宽、延迟和点击精度都更好,此时归一化坐标 0..1 相对该目标帧。后续 remote_mouse/remote_keyboard 用归一化坐标(0..1)注入输入,用毕须 remote_close。Linux 需要 X11/Xorg(或 XWayland)桌面,纯 Wayland 会话无法抓屏/注入;window_hwnd/region 仅支持声明 CLIENT_CAP_WINDOW_INFO 的新 Windows 客户端。Windows 多显示器下整屏目标需要新版客户端(整虚拟桌面抓屏),老客户端会被拒绝;window 目标不依赖虚拟桌面抓屏,不受此限。Android 主机只支持整屏目标,输入被翻译成触摸手势与全局动作(见 remote_mouse / remote_keyboard);抓屏依赖客户端已授权录屏(MediaProjection),未授权时 remote_open 会一直等不到屏幕子连接,注入还依赖无障碍服务在跑(未开启时命令照样下发但不生效,且没有回执)。",
|
||||
"gate": "remote_control",
|
||||
"write": true,
|
||||
"platforms": [
|
||||
"win",
|
||||
"lnx"
|
||||
"lnx",
|
||||
"apk"
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
@@ -2441,7 +2442,8 @@
|
||||
"write": true,
|
||||
"platforms": [
|
||||
"win",
|
||||
"lnx"
|
||||
"lnx",
|
||||
"apk"
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
@@ -2476,12 +2478,13 @@
|
||||
},
|
||||
{
|
||||
"name": "remote_keyboard",
|
||||
"description": "向已建立的远程控制会话注入键盘事件。action 可选 key_down / key_up / key_press / type:前三种需 key(虚拟键名,如 ENTER/TAB/F5/LEFT/CTRL/ALT/SHIFT/WIN,Linux 侧映射为 X11 keysym),type 需 text(仅 ASCII 文本;非 ASCII 请用 remote_clipboard + Ctrl+V)。modifiers 可选(CTRL/ALT/SHIFT/WIN)。可选 expect_hwnd:注入前先确认目标窗口仍在可见列表里(整数或 0x 字符串);配合 require_foreground=true 还要求它已是前台,否则不发注入返回 -32000;同时默认在结果里回报注入后的前台窗口(structuredContent.foreground),用于确认按键真的进了目标窗口。窗口校验仅新 Windows 客户端支持,其他客户端返回 -32005。",
|
||||
"description": "向已建立的远程控制会话注入键盘事件。action 可选 key_down / key_up / key_press / type:前三种需 key(虚拟键名,如 ENTER/TAB/F5/LEFT/CTRL/ALT/SHIFT/WIN,Linux 侧映射为 X11 keysym),type 需 text(仅 ASCII 文本;非 ASCII 请用 remote_clipboard + Ctrl+V)。modifiers 可选(CTRL/ALT/SHIFT/WIN)。可选 expect_hwnd:注入前先确认目标窗口仍在可见列表里(整数或 0x 字符串);配合 require_foreground=true 还要求它已是前台,否则不发注入返回 -32000;同时默认在结果里回报注入后的前台窗口(structuredContent.foreground),用于确认按键真的进了目标窗口。窗口校验仅新 Windows 客户端支持,其他客户端返回 -32005。Android 主机没有键盘注入:只有 ESC(返回)/HOME(桌面)/APPS(任务列表)/PRINTSCREEN(截屏)这类全局动作、方向键(TV 主机)以及 key=V(粘贴当前剪贴板,需要新版 APK)生效,action=type 对 Android 直接返回 -32005,expect_hwnd 系列参数也返回 -32005;注入需要客户端开启无障碍服务,且没有回执(ok 只代表已下发)。",
|
||||
"gate": "remote_control",
|
||||
"write": true,
|
||||
"platforms": [
|
||||
"win",
|
||||
"lnx"
|
||||
"lnx",
|
||||
"apk"
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
@@ -2490,6 +2493,13 @@
|
||||
"description": "动作:key_down / key_up / key_press / type",
|
||||
"type": "string"
|
||||
},
|
||||
"expect_hwnd": {
|
||||
"description": "可选:注入前先确认目标窗口仍在当前可见窗口列表中(整数或 0x 前缀字符串)。顺带默认回报前台窗口;仅新 Windows 客户端支持(否则 -32005)。",
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"description": "主机 id,取 list_online_hosts / search_hosts 返回的 id 字段",
|
||||
"type": "string"
|
||||
@@ -2505,6 +2515,14 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"report_foreground": {
|
||||
"description": "可选:注入后回报前台窗口(structuredContent.foreground)。给了 expect_hwnd 时默认 true",
|
||||
"type": "boolean"
|
||||
},
|
||||
"require_foreground": {
|
||||
"description": "可选:配合 expect_hwnd,要求该窗口已是前台,否则不发注入并返回 -32000。默认 false",
|
||||
"type": "boolean"
|
||||
},
|
||||
"session_id": {
|
||||
"description": "remote_open 返回的 session_id",
|
||||
"type": "string"
|
||||
@@ -2512,21 +2530,6 @@
|
||||
"text": {
|
||||
"description": "文本(type 用,仅 ASCII;非 ASCII 请走 remote_clipboard + Ctrl+V)",
|
||||
"type": "string"
|
||||
},
|
||||
"expect_hwnd": {
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
],
|
||||
"description": "可选:注入前先确认目标窗口仍在当前可见窗口列表中(整数或 0x 前缀字符串)。顺带默认回报前台窗口;仅新 Windows 客户端支持(否则 -32005)。"
|
||||
},
|
||||
"require_foreground": {
|
||||
"type": "boolean",
|
||||
"description": "可选:配合 expect_hwnd,要求该窗口已是前台,否则不发注入并返回 -32000。默认 false"
|
||||
},
|
||||
"report_foreground": {
|
||||
"type": "boolean",
|
||||
"description": "可选:注入后回报前台窗口(structuredContent.foreground)。给了 expect_hwnd 时默认 true"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2537,34 +2540,35 @@
|
||||
"type": "object"
|
||||
},
|
||||
"outputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expectedWindow": {
|
||||
"type": "object",
|
||||
"description": "expect_hwnd 时注入前的目标窗口快照"
|
||||
"description": "expect_hwnd 时注入前的目标窗口快照",
|
||||
"type": "object"
|
||||
},
|
||||
"foreground": {
|
||||
"description": "注入后的前台窗口(report_foreground 时返回;无前台窗口为 null)",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "注入后的前台窗口(report_foreground 时返回;无前台窗口为 null)"
|
||||
]
|
||||
},
|
||||
"foregroundError": {
|
||||
"type": "string",
|
||||
"description": "前台回报失败的原因(注入本身已成功)"
|
||||
"description": "前台回报失败的原因(注入本身已成功)",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "remote_mouse",
|
||||
"description": "向已建立的远程控制会话注入鼠标事件。action 可选 move / down / up / click / right_click / middle_click / drag / scroll;坐标 x/y(及 drag 的 x2/y2)为归一化 0..1 浮点,默认相对整屏/整虚拟桌面(remote_open 用 window_hwnd/region 时相对该目标帧)。给 window_hwnd 时改为相对「该窗口与虚拟桌面的交集」(窗口完整可见时即窗口本身;0=左/上边缘,1=右/下边缘),可直接照 get_screenshot mode=window 的图量比例:服务端用该交集与虚拟桌面矩形换算成屏幕坐标,并默认要求该窗口在前台(require_foreground=false 可显式关闭;与 expect_hwnd 同时给出时须指向同一窗口);会话本身已锁定窗口/区域时不要再传 window_hwnd。button 可选 left/middle/right(默认 left);click 的 clicks 可选 1/2/3(默认 1);scroll 的 delta 正=向下滚、负=向上滚。可选 expect_hwnd / require_foreground / report_foreground 与 remote_keyboard 同义(新 Windows 客户端),可用它确认点击确实落在目标窗口。",
|
||||
"description": "向已建立的远程控制会话注入鼠标事件。action 可选 move / down / up / click / right_click / middle_click / drag / scroll;坐标 x/y(及 drag 的 x2/y2)为归一化 0..1 浮点,默认相对整屏/整虚拟桌面(remote_open 用 window_hwnd/region 时相对该目标帧)。给 window_hwnd 时改为相对「该窗口与虚拟桌面的交集」(窗口完整可见时即窗口本身;0=左/上边缘,1=右/下边缘),可直接照 get_screenshot mode=window 的图量比例:服务端用该交集与虚拟桌面矩形换算成屏幕坐标,并默认要求该窗口在前台(require_foreground=false 可显式关闭;与 expect_hwnd 同时给出时须指向同一窗口);会话本身已锁定窗口/区域时不要再传 window_hwnd。button 可选 left/middle/right(默认 left);click 的 clicks 可选 1/2/3(默认 1);scroll 的 delta 正=向下滚、负=向上滚。可选 expect_hwnd / require_foreground / report_foreground 与 remote_keyboard 同义(新 Windows 客户端),可用它确认点击确实落在目标窗口。Android 主机把事件翻译成触摸:click=点按、right_click=长按、drag=滑动、scroll=上下滑,middle_click 无效果,down/up 单独使用无意义;window_hwnd 系列参数返回 -32005,注入需要客户端开启无障碍服务且没有回执(ok 只代表已下发)。",
|
||||
"gate": "remote_control",
|
||||
"write": true,
|
||||
"platforms": [
|
||||
"win",
|
||||
"lnx"
|
||||
"lnx",
|
||||
"apk"
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
@@ -2600,14 +2604,36 @@
|
||||
"description": "滚动量(仅 scroll;正=向下滚,负=向上滚,与 Web 控制台一致;仅垂直滚轮,忽略 button)",
|
||||
"type": "integer"
|
||||
},
|
||||
"expect_hwnd": {
|
||||
"description": "可选:注入前先确认目标窗口仍在当前可见窗口列表中(整数或 0x 前缀字符串)。顺带默认回报前台窗口;仅新 Windows 客户端支持(否则 -32005)。",
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"description": "主机 id,取 list_online_hosts / search_hosts 返回的 id 字段",
|
||||
"type": "string"
|
||||
},
|
||||
"report_foreground": {
|
||||
"description": "可选:注入后回报前台窗口(structuredContent.foreground)。给了 expect_hwnd 时默认 true",
|
||||
"type": "boolean"
|
||||
},
|
||||
"require_foreground": {
|
||||
"description": "可选:配合 expect_hwnd,要求该窗口已是前台,否则不发注入并返回 -32000。默认 false",
|
||||
"type": "boolean"
|
||||
},
|
||||
"session_id": {
|
||||
"description": "remote_open 返回的 session_id",
|
||||
"type": "string"
|
||||
},
|
||||
"window_hwnd": {
|
||||
"description": "可选:以该窗口为坐标基准(整数或 0x 前缀字符串)。给定后 x/y(及 drag 的 x2/y2)变为相对「窗口与虚拟桌面的交集」的归一化坐标(窗口完整可见时即窗口本身),服务端用该交集与虚拟桌面矩形换算成屏幕坐标,可直接用 get_screenshot mode=window 图上的比例点。默认要求该窗口是前台(可用 require_foreground=false 显式关闭;与 expect_hwnd 同时给出时须指向同一窗口);窗口不存在/最小化/完全移出虚拟桌面时报错。仅新 Windows 客户端支持(窗口信息 RPC 需带虚拟桌面矩形),否则 -32005。会话本身已只推窗口/区域(remote_open 的 window_hwnd/region)时不要再传:坐标本来就相对目标帧。",
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "归一化 X 坐标(0=屏幕最左,1=最右);给了 window_hwnd 时改为相对「窗口与虚拟桌面的交集」(窗口完整可见时即窗口),0=左边缘,1=右边缘",
|
||||
"type": "number"
|
||||
@@ -2623,28 +2649,6 @@
|
||||
"y2": {
|
||||
"description": "拖拽终点 Y(仅 drag;坐标基准与 y 相同)",
|
||||
"type": "number"
|
||||
},
|
||||
"expect_hwnd": {
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
],
|
||||
"description": "可选:注入前先确认目标窗口仍在当前可见窗口列表中(整数或 0x 前缀字符串)。顺带默认回报前台窗口;仅新 Windows 客户端支持(否则 -32005)。"
|
||||
},
|
||||
"require_foreground": {
|
||||
"type": "boolean",
|
||||
"description": "可选:配合 expect_hwnd,要求该窗口已是前台,否则不发注入并返回 -32000。默认 false"
|
||||
},
|
||||
"report_foreground": {
|
||||
"type": "boolean",
|
||||
"description": "可选:注入后回报前台窗口(structuredContent.foreground)。给了 expect_hwnd 时默认 true"
|
||||
},
|
||||
"window_hwnd": {
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
],
|
||||
"description": "可选:以该窗口为坐标基准(整数或 0x 前缀字符串)。给定后 x/y(及 drag 的 x2/y2)变为相对「窗口与虚拟桌面的交集」的归一化坐标(窗口完整可见时即窗口本身),服务端用该交集与虚拟桌面矩形换算成屏幕坐标,可直接用 get_screenshot mode=window 图上的比例点。默认要求该窗口是前台(可用 require_foreground=false 显式关闭;与 expect_hwnd 同时给出时须指向同一窗口);窗口不存在/最小化/完全移出虚拟桌面时报错。仅新 Windows 客户端支持(窗口信息 RPC 需带虚拟桌面矩形),否则 -32005。会话本身已只推窗口/区域(remote_open 的 window_hwnd/region)时不要再传:坐标本来就相对目标帧。"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -2657,42 +2661,43 @@
|
||||
"type": "object"
|
||||
},
|
||||
"outputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"coordinateWindow": {
|
||||
"description": "window_hwnd 时命中的窗口原始快照(left/top/right/bottom/width/height,未裁剪);实际归一化基准是 resolved.basis(窗口与虚拟桌面的交集)",
|
||||
"type": "object"
|
||||
},
|
||||
"expectedWindow": {
|
||||
"type": "object",
|
||||
"description": "expect_hwnd 时注入前的目标窗口快照"
|
||||
"description": "expect_hwnd 时注入前的目标窗口快照",
|
||||
"type": "object"
|
||||
},
|
||||
"foreground": {
|
||||
"description": "注入后的前台窗口(report_foreground 时返回;无前台窗口为 null)",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "注入后的前台窗口(report_foreground 时返回;无前台窗口为 null)"
|
||||
]
|
||||
},
|
||||
"foregroundError": {
|
||||
"type": "string",
|
||||
"description": "前台回报失败的原因(注入本身已成功)"
|
||||
},
|
||||
"coordinateWindow": {
|
||||
"type": "object",
|
||||
"description": "window_hwnd 时命中的窗口原始快照(left/top/right/bottom/width/height,未裁剪);实际归一化基准是 resolved.basis(窗口与虚拟桌面的交集)"
|
||||
"description": "前台回报失败的原因(注入本身已成功)",
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "object",
|
||||
"description": "window_hwnd 时换算后的发送帧归一化坐标(frame_x/frame_y,drag 另有 frame_x2/frame_y2);basis 为实际坐标基准矩形 left/top/right/bottom(窗口与虚拟桌面的交集,与 get_screenshot mode=window 的源矩形一致)"
|
||||
"description": "window_hwnd 时换算后的发送帧归一化坐标(frame_x/frame_y,drag 另有 frame_x2/frame_y2);basis 为实际坐标基准矩形 left/top/right/bottom(窗口与虚拟桌面的交集,与 get_screenshot mode=window 的源矩形一致)",
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "remote_clipboard",
|
||||
"description": "把文本写入远程主机的剪贴板(服务端按 GBK/ANSI 下发,Linux 客户端自动转回 UTF-8;非 GBK 字符如 emoji 会丢失)。仅设置剪贴板,粘贴需随后用 remote_keyboard 注入 Ctrl+V;Linux 需要 X11 桌面与 xclip/xsel。",
|
||||
"description": "把文本写入远程主机的剪贴板(服务端按 GBK/ANSI 下发,Linux 客户端自动转回 UTF-8,Android 客户端按 GBK 解码;非 GBK 字符如 emoji 会丢失)。仅设置剪贴板,粘贴需随后用 remote_keyboard 注入 Ctrl+V;Linux 需要 X11 桌面与 xclip/xsel,Android 用 remote_keyboard 的 key=V(粘贴到当前焦点输入框,需要新版 APK;粘贴依赖无障碍服务)。",
|
||||
"gate": "remote_control",
|
||||
"write": true,
|
||||
"platforms": [
|
||||
"win",
|
||||
"lnx"
|
||||
"lnx",
|
||||
"apk"
|
||||
],
|
||||
"impl": "mfc",
|
||||
"inputSchema": {
|
||||
@@ -3122,24 +3127,24 @@
|
||||
"description": "命令已下发(不代表窗口已按预期变化);action=activate 时为前台复核结果",
|
||||
"type": "boolean"
|
||||
},
|
||||
"state": {
|
||||
"description": "action=activate 时的复核状态:foreground / background / missing / unknown",
|
||||
"type": "string"
|
||||
},
|
||||
"truncated": {
|
||||
"description": "为 true 时表示复核用的可见窗口列表被 96 条单次上限截断,未找到目标不代表窗口不存在(此时 state=unknown)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"verifyError": {
|
||||
"description": "action=activate 且前台复核请求失败时的错误说明",
|
||||
"type": "string"
|
||||
},
|
||||
"window": {
|
||||
"description": "dry_run 时的目标窗口;action=activate 时为复核到的窗口快照(hwnd/title/pid/rect/flags 等),复核未找到为 null",
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "action=activate 时的复核状态:foreground / background / missing / unknown"
|
||||
},
|
||||
"verifyError": {
|
||||
"type": "string",
|
||||
"description": "action=activate 且前台复核请求失败时的错误说明"
|
||||
},
|
||||
"truncated": {
|
||||
"description": "为 true 时表示复核用的可见窗口列表被 96 条单次上限截断,未找到目标不代表窗口不存在(此时 state=unknown)",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -4138,9 +4143,17 @@
|
||||
"description": "未过滤的条目总数",
|
||||
"type": "integer"
|
||||
},
|
||||
"truncated": {
|
||||
"description": "为 true 时表示客户端的可见窗口多于单次返回上限(96 条),列表不完整",
|
||||
"type": "boolean"
|
||||
},
|
||||
"windows": {
|
||||
"items": {
|
||||
"properties": {
|
||||
"bottom": {
|
||||
"description": "窗口矩形下边界(屏幕坐标,不含边界);height = bottom - top",
|
||||
"type": "integer"
|
||||
},
|
||||
"canSee": {
|
||||
"description": "客户端是否可抓取该窗口画面",
|
||||
"type": "boolean"
|
||||
@@ -4152,59 +4165,51 @@
|
||||
"description": "窗口句柄(十进制;也可用作 host_control_window / operate_window 的 hwnd)",
|
||||
"type": "integer"
|
||||
},
|
||||
"isForeground": {
|
||||
"description": "是否为当前前台窗口(全表最多一个 true)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"left": {
|
||||
"description": "窗口矩形左边界(屏幕坐标,可能为负,多显示器时常见)",
|
||||
"type": "integer"
|
||||
},
|
||||
"maximized": {
|
||||
"description": "是否最大化",
|
||||
"type": "boolean"
|
||||
},
|
||||
"minimized": {
|
||||
"description": "是否最小化",
|
||||
"type": "boolean"
|
||||
},
|
||||
"pid": {
|
||||
"type": "integer"
|
||||
},
|
||||
"right": {
|
||||
"description": "窗口矩形右边界(屏幕坐标,不含边界);width = right - left",
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"top": {
|
||||
"description": "窗口矩形上边界(屏幕坐标)",
|
||||
"type": "integer"
|
||||
},
|
||||
"visible": {
|
||||
"description": "是否可见;当前列表只含可见窗口,故恒为 true",
|
||||
"type": "boolean"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer"
|
||||
},
|
||||
"left": {
|
||||
"type": "integer",
|
||||
"description": "窗口矩形左边界(屏幕坐标,可能为负,多显示器时常见)"
|
||||
},
|
||||
"top": {
|
||||
"type": "integer",
|
||||
"description": "窗口矩形上边界(屏幕坐标)"
|
||||
},
|
||||
"right": {
|
||||
"type": "integer",
|
||||
"description": "窗口矩形右边界(屏幕坐标,不含边界);width = right - left"
|
||||
},
|
||||
"bottom": {
|
||||
"type": "integer",
|
||||
"description": "窗口矩形下边界(屏幕坐标,不含边界);height = bottom - top"
|
||||
},
|
||||
"visible": {
|
||||
"type": "boolean",
|
||||
"description": "是否可见;当前列表只含可见窗口,故恒为 true"
|
||||
},
|
||||
"minimized": {
|
||||
"type": "boolean",
|
||||
"description": "是否最小化"
|
||||
},
|
||||
"maximized": {
|
||||
"type": "boolean",
|
||||
"description": "是否最大化"
|
||||
},
|
||||
"isForeground": {
|
||||
"type": "boolean",
|
||||
"description": "是否为当前前台窗口(全表最多一个 true)"
|
||||
},
|
||||
"zOrder": {
|
||||
"type": "integer",
|
||||
"description": "z 序,0 = 最顶层;数值越小越靠前"
|
||||
"description": "z 序,0 = 最顶层;数值越小越靠前",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"truncated": {
|
||||
"description": "为 true 时表示客户端的可见窗口多于单次返回上限(96 条),列表不完整",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
Reference in new issue
Block a user