Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
7625b197
D
Docs
项目概览
OpenHarmony
/
Docs
11 个月 前同步成功
通知
158
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
7625b197
编写于
10月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!10482 多模子系统错误码md整改
Merge pull request !10482 from mayunteng/master
上级
344e916d
58f6533e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
44 addition
and
69 deletion
+44
-69
zh-cn/application-dev/reference/apis/js-apis-cooperate.md
zh-cn/application-dev/reference/apis/js-apis-cooperate.md
+26
-12
zh-cn/application-dev/reference/errorcodes/errorcodes-multimodalinput.md
...on-dev/reference/errorcodes/errorcodes-multimodalinput.md
+18
-57
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-cooperate.md
浏览文件 @
7625b197
...
...
@@ -13,7 +13,7 @@
import
inputDeviceCooperate
from
'
@ohos.multimodalInput.inputDeviceCooperate
'
```
## inputDeviceCooperate.enable
<sup>9+</sup>
## inputDeviceCooperate.enable
enable(enable: boolean, callback: AsyncCallback
\<
void>): void
...
...
@@ -46,7 +46,7 @@ try {
}
```
## inputDeviceCooperate.enable
<sup>9+</sup>
## inputDeviceCooperate.enable
enable(enable: boolean): Promise
\<
void>
...
...
@@ -84,7 +84,7 @@ try {
}
```
## inputDeviceCooperate.start
<sup>9+</sup>
## inputDeviceCooperate.start
start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback
\<
void>): void
...
...
@@ -100,7 +100,14 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCal
| srcInputDeviceId | number | 是 | 键鼠穿越待穿越外设标识符。 |
| callback | AsyncCallback
\<
void> | 是 | 异步回调函数。当键鼠穿越启动成功,err为undefined,否则为错误对象。|
**错误码:**
以下错误码的详细介绍请参见
[
ohos.multimodalinput错误码
](
../errorcodes/errorcodes-multimodalinput.md
)
。
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 4400001 | Incorrect descriptor for the target device. |
| 4400002 | Failed to operate the input device. |
**示例**
:
...
...
@@ -118,7 +125,7 @@ try {
}
```
## inputDeviceCooperate.start
<sup>9+</sup>
## inputDeviceCooperate.start
start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise
\<
void>
...
...
@@ -141,7 +148,14 @@ start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise\<void>
| ---------------------- | ------------------------------- |
| Promise
\<
void> | Promise实例,用于异步获取结果。 |
**错误码:**
以下错误码的详细介绍请参见
[
ohos.multimodalinput错误码
](
../errorcodes/errorcodes-multimodalinput.md
)
。
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 4400001 | Incorrect descriptor for the target device. |
| 4400002 | Failed to operate the input device. |
**示例**
:
...
...
@@ -157,7 +171,7 @@ try {
}
```
## inputDeviceCooperate.stop
<sup>9+</sup>
## inputDeviceCooperate.stop
stop(callback: AsyncCallback
\<
void>): void
...
...
@@ -189,7 +203,7 @@ try {
}
```
## inputDeviceCooperate.stop
<sup>9+</sup>
## inputDeviceCooperate.stop
stop(): Promise
\<
void>
...
...
@@ -217,7 +231,7 @@ try {
}
```
## inputDeviceCooperate.getState
<sup>9+</sup>
## inputDeviceCooperate.getState
getState(deviceDescriptor: string, callback: AsyncCallback
<
{
state:
boolean
}
>
): void
...
...
@@ -248,7 +262,7 @@ try {
}
```
## inputDeviceCooperate.getState
<sup>9+</sup>
## inputDeviceCooperate.getState
getState(deviceDescriptor: string): Promise
<
{
state:
boolean
}
>
...
...
@@ -286,7 +300,7 @@ try {
}
```
## on('cooperation')
<sup>9+</sup>
## on('cooperation')
on(type: 'cooperation', callback: AsyncCallback
<
{
deviceDescriptor:
string
,
eventMsg:
EventMsg
}
>
): void
...
...
@@ -319,7 +333,7 @@ try {
}
```
## off('cooperation')
<sup>9+</sup>
## off('cooperation')
off(type: 'cooperation', callback?: AsyncCallback
\<
void>): void
...
...
@@ -352,7 +366,7 @@ try {
}
```
## EventMsg
<sup>9+</sup>
## EventMsg
键鼠穿越事件。
...
...
@@ -364,4 +378,4 @@ try {
| MSG_COOPERATE_INFO_SUCCESS | 201 | 键鼠穿越消息,表示键鼠穿越成功。 |
| MSG_COOPERATE_INFO_FAIL | 202 | 键鼠穿越消息,表示键鼠穿越失败。 |
| MSG_COOPERATE_STATE_ON | 500 | 键鼠穿越状态,表示键鼠穿越状态开启。 |
| MSG_COOPERATE_STATE_OFF | 501 | 键鼠穿越状态,表示键鼠穿越状态关闭。 |
\ No newline at end of file
| MSG_COOPERATE_STATE_OFF | 501 | 键鼠穿越状态,表示键鼠穿越状态关闭。 |
zh-cn/application-dev/reference/errorcodes/errorcodes-multimodalinput.md
浏览文件 @
7625b197
# 多模输入子系统错误码
## 201 权限校验失败
### 错误信息
Permission denied.
### 错误描述
当调用监听模块on和off接口时,若没有申请权限,会报此错误码。
### 可能原因
监听、去监听鼠标和触屏事件时未配置相应的权限。
### 处理步骤
查看权限是否已适配,具体配置方式请参考
[
权限申请声明
](
../../security/accesstoken-guidelines.md
)
。
## 401 参数检查错误
### 错误信息
The parameter invalid.
### 错误描述
当调用监听模块或者键鼠穿越等其他模块接口时,若传入参数的类型或者范围不匹配,会报此错误码。
### 可能原因
1.
入参类型错误不匹配,如监听接口传入type为非string类型等。
2.
入参范围不匹配,如插上设备信息时传入非法的deviceId。
### 处理步骤
检查入参类型和范围是否匹配。
# 键鼠穿越管理错误码
## 4400001 目标设备描述符错误
### 错误信息
**错误信息**
Incorrect descriptor for the target device.
### 错误描述
当调用键鼠穿越start接口时,若设备无效,会报此错误码。
**错误描述**
### 可能原因
当调用键鼠穿越接口传入无效的设备描述符参数时,系统会产生此错误码。
1.
穿越目标设备不存在(设备未组网)。
**可能原因**
2.
目标设备描述符为空。
1.
穿越目标设备不存在(设备未组网)。
2.
目标设备描述符为空。
### 处理步骤
**处理步骤**
1.
确认键鼠穿越目标设备是否已正确与本地设备完整组网。
2.
正确使用穿越目标设备的设备描述符。
1.
请
确认键鼠穿越目标设备是否已正确与本地设备完整组网。
2.
请
正确使用穿越目标设备的设备描述符。
## 4400002 操作输入设备失败
### 错误信息
**错误信息**
Failed to operate the input device.
### 错误描述
**错误描述**
当调用键鼠穿越
start接口时,若穿越状态异常,会报
此错误码。
当调用键鼠穿越
接口时穿越状态异常,系统会产生
此错误码。
### 可能原因
**可能原因**
1.
发起键鼠穿越时,本机键鼠穿越为穿出状态。
2.
关闭键鼠穿越时,本机键鼠穿越为自由态。
3.
发起关闭键鼠穿越时,本机键鼠穿越状态正在切换中。
### 处理步骤
**处理步骤**
1.
发起键鼠穿越时,本机键鼠穿越状态需要为非穿出状态。
2.
关闭键鼠穿越时,本机键鼠穿越状态需要为非自由态。
3.
发起关闭键鼠穿越时,本机键鼠穿越状态不能处于切换中。
\ No newline at end of file
1.
发起键鼠穿越时,请检查本机键鼠穿越状态是否为非穿出状态。
2.
关闭键鼠穿越时,请检查本机键鼠穿越状态是否为非自由态。
3.
发起关闭键鼠穿越时,请检查本机键鼠穿越状态是否在切换中。
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录