提交 7e2aa564 编写于 作者: S shawn_he

update docs

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 78eeee8e
...@@ -11,7 +11,7 @@ The input device management module is used to listen for the connection, disconn ...@@ -11,7 +11,7 @@ The input device management module is used to listen for the connection, disconn
## Modules to Import ## Modules to Import
``` ```js
import inputDevice from '@ohos.multimodalInput.inputDevice'; import inputDevice from '@ohos.multimodalInput.inputDevice';
``` ```
...@@ -33,7 +33,7 @@ Obtains the IDs of all input devices. This API uses an asynchronous callback to ...@@ -33,7 +33,7 @@ Obtains the IDs of all input devices. This API uses an asynchronous callback to
**Example** **Example**
``` ```js
export default { export default {
data: { data: {
deviceIds: Array, deviceIds: Array,
...@@ -65,7 +65,7 @@ Obtains the IDs of all input devices. This API uses a promise to return the resu ...@@ -65,7 +65,7 @@ Obtains the IDs of all input devices. This API uses a promise to return the resu
**Example** **Example**
``` ```js
export default { export default {
testGetDeviceIds: function () { testGetDeviceIds: function () {
console.info("InputDeviceJsTest---start---testGetDeviceIds"); console.info("InputDeviceJsTest---start---testGetDeviceIds");
...@@ -100,7 +100,7 @@ Obtains the information about an input device. This API uses an asynchronous cal ...@@ -100,7 +100,7 @@ Obtains the information about an input device. This API uses an asynchronous cal
**Example** **Example**
``` ```js
export default { export default {
InputDeviceData: { InputDeviceData: {
deviceId : 0, deviceId : 0,
...@@ -136,7 +136,7 @@ Obtains the information about an input device. This API uses a promise to return ...@@ -136,7 +136,7 @@ Obtains the information about an input device. This API uses a promise to return
**Example** **Example**
``` ```js
export default { export default {
InputDeviceData: { InputDeviceData: {
deviceId : 0, deviceId : 0,
...@@ -166,17 +166,17 @@ Defines the information about an input device. ...@@ -166,17 +166,17 @@ Defines the information about an input device.
**System capability**: SystemCapability.MultimodalInput.Input.InputDevice **System capability**: SystemCapability.MultimodalInput.Input.InputDevice
| Name | Type | Description | | Name | Type | Description |
| ---------- | -------------------------------------- | ------------------------------------------------------------ | | ---------- | -------------------------- | ---------------------------------------------------- |
| id | number | Unique identifier of an input device. If the same physical device is repeatedly inserted and removed, its ID changes.| | id | number | Unique identifier of an input device. If the same physical device is repeatedly inserted and removed, its ID changes. |
| name | string | Name of the input device. | | name | string | Name of the input device. |
| sources | Array&lt;[SourceType](#sourcetype)&gt; | Source types of the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad.| | sources | Array&lt;[SourceType](#sourcetype)&gt; | Source types of the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad. |
| axisRanges | Array&lt;[axisRanges](#axisrange)&gt; | Axis information of the input device. | | axisRanges | Array&lt;[axisRanges](#axisrange)&gt; | Axis information of the input device. |
| bus | number | Bus type of the input device. | | bus | number | Bus type of the input device. |
| product | number | Product information of the input device. | | product | number | Product information of the input device. |
| vendor | number | Vendor information of the input device. | | vendor | number | Vendor information of the input device. |
| version | number | Version information of the input device. | | version | number | Version information of the input device. |
| phys | string | Physical address of the input device. | | phys | string | Physical address of the input device. |
| uniq | string | Unique ID of the input device. | | uniq | string | Unique ID of the input device. |
## AxisType ## AxisType
......
# Input Event Client # Input Event Client
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**
> >
> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> >
> - The APIs of this module are system APIs and cannot be called by third-party applications. > The APIs of this module are system APIs and cannot be called by third-party applications.
## Modules to Import ## Modules to Import
``` ```js
import inputEventClient from '@ohos.multimodalInput.inputEventClient'; import inputEventClient from '@ohos.multimodalInput.inputEventClient';
``` ```
...@@ -32,14 +32,14 @@ Injects a key. ...@@ -32,14 +32,14 @@ Injects a key.
**Example** **Example**
``` ```js
let keyEvent = { let keyEvent = {
isPressed: true, isPressed: true,
keyCode: 2, keyCode: 2,
keyDownDuration: 0, keyDownDuration: 0,
isIntercepted: false isIntercepted: false
} }
res = inputEventClient.injectEvent({KeyEvent: keyEvent}); let res = inputEventClient.injectEvent({KeyEvent: keyEvent});
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册