Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
ed15744f
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
提交
ed15744f
编写于
6月 30, 2022
作者:
S
shaoziyun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
多模md文件修改
Signed-off-by:
N
shaoziyun
<
shaoziyun@huawei.com
>
上级
1e8d4b88
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
6 addition
and
6 deletion
+6
-6
zh-cn/application-dev/reference/apis/js-apis-inputdevice.md
zh-cn/application-dev/reference/apis/js-apis-inputdevice.md
+6
-6
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-inputdevice.md
浏览文件 @
ed15744f
...
...
@@ -28,7 +28,7 @@ on(type: “change”, listener: Callback<DeviceListener>): void
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------- |
| type | string | 是 | 输入设备的事件类型。 |
| listener | Callback
<
[DeviceListener](#devicelistener9
+
)
>
| 是 | 可上报的输入设备事件。 |
| listener | Callback
<
[DeviceListener](#devicelistener9)
>
| 是 | 可上报的输入设备事件。 |
**示例**
:
...
...
@@ -63,7 +63,7 @@ off(type: “change”, listener?: Callback<DeviceListener>): void
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ----------- |
| type | string | 是 | 输入设备的事件类型。 |
| listener | Callback
<
[DeviceListener](#devicelistener
<sup>
9+
</sup>
)
>
| 否 | 可上报的输入设备事件。 |
| listener | Callback
<
[DeviceListener](#devicelistener
9
)
>
| 否 | 可上报的输入设备事件。 |
**示例**
:
...
...
@@ -245,7 +245,7 @@ getKeyboardType(deviceId: number, callback: AsyncCallback<KeyboardType>):
| 参数 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | --------------------------------- |
| deviceId | number | 是 | 输入设备的唯一标识,同一个物理设备反复插拔,其设备id会发生变化。 |
| callback | AsyncCallback
<
[KeyboardType](#
KeyboardType
<sup>
9+
</sup>
)
>
| 是 | 回调函数,异步返回查询结果。 |
| callback | AsyncCallback
<
[KeyboardType](#
keyboardtype9
)
>
| 是 | 回调函数,异步返回查询结果。 |
**示例**
:
...
...
@@ -268,7 +268,7 @@ getKeyboardType(deviceId: number): Promise<KeyboardType>
| 参数 | 说明 |
| ---------------------------------------- | ------------------- |
| Promise
<
[KeyboardType](#keyboardtype)
>
| Promise实例,用于异步获取结果。 |
| Promise
<
[KeyboardType](#keyboardtype
9
)
>
| Promise实例,用于异步获取结果。 |
**示例**
:
...
...
@@ -301,7 +301,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
| id | number | 输入设备的唯一标识,同一个物理设备反复插拔,其设备id会发生变化。 |
| name | string | 输入设备的名字。 |
| sources | Array
<
[SourceType](#sourcetype)
>
| 输入设备支持的源类型。比如有的键盘上附带触摸板,则此设备有keyboard和touchpad两种输入源。 |
| axisRanges | Array
<
[
a
xisRanges](#axisrange)
>
| 输入设备的轴信息。 |
| axisRanges | Array
<
[
A
xisRanges](#axisrange)
>
| 输入设备的轴信息。 |
| bus
<sup>
9+
</sup>
| number | 输入设备的总线类型。 |
| product
<sup>
9+
</sup>
| number | 输入设备的产品信息。 |
| vendor
<sup>
9+
</sup>
| number | 输入设备的厂商信息。 |
...
...
@@ -336,7 +336,7 @@ inputDevice.getKeyboardType(1).then((ret)=>{
| 名称 | 参数类型 | 说明 |
| ----------------------- | ------------------------- | -------- |
| source |
[
SourceType
](
#sourcetype
)
| 轴的输入源类型。 |
| axis |
[
AxisType
](
#axistype9
+
)
| 轴的类型。 |
| axis |
[
AxisType
](
#axistype9
)
| 轴的类型。 |
| max | number | 轴的最大值。 |
| min | number | 轴的最小值。 |
| fuzz
<sup>
9+
</sup>
| number | 轴的模糊值。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录