From 7e2aa5646cc4c2a329b02be64b735448b951aef7 Mon Sep 17 00:00:00 2001 From: shawn_he Date: Mon, 20 Jun 2022 16:13:21 +0800 Subject: [PATCH] update docs Signed-off-by: shawn_he --- .../reference/apis/js-apis-inputdevice.md | 32 +++++++++---------- .../apis/js-apis-inputeventclient.md | 12 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-inputdevice.md b/en/application-dev/reference/apis/js-apis-inputdevice.md index b9b569cbd3..eca20fafe0 100644 --- a/en/application-dev/reference/apis/js-apis-inputdevice.md +++ b/en/application-dev/reference/apis/js-apis-inputdevice.md @@ -11,7 +11,7 @@ The input device management module is used to listen for the connection, disconn ## Modules to Import -``` +```js import inputDevice from '@ohos.multimodalInput.inputDevice'; ``` @@ -33,7 +33,7 @@ Obtains the IDs of all input devices. This API uses an asynchronous callback to **Example** -``` +```js export default { data: { deviceIds: Array, @@ -65,7 +65,7 @@ Obtains the IDs of all input devices. This API uses a promise to return the resu **Example** -``` +```js export default { testGetDeviceIds: function () { console.info("InputDeviceJsTest---start---testGetDeviceIds"); @@ -100,7 +100,7 @@ Obtains the information about an input device. This API uses an asynchronous cal **Example** -``` +```js export default { InputDeviceData: { deviceId : 0, @@ -136,7 +136,7 @@ Obtains the information about an input device. This API uses a promise to return **Example** -``` +```js export default { InputDeviceData: { deviceId : 0, @@ -166,17 +166,17 @@ Defines the information about an input device. **System capability**: SystemCapability.MultimodalInput.Input.InputDevice | Name | Type | Description | -| ---------- | -------------------------------------- | ------------------------------------------------------------ | -| 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. | -| sources | Array<[SourceType](#sourcetype)> | 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<[axisRanges](#axisrange)> | Axis information of the input device. | -| bus | number | Bus type of the input device. | -| product | number | Product information of the input device. | -| vendor | number | Vendor information of the input device. | -| version | number | Version information of the input device. | -| phys | string | Physical address of the input device. | -| uniq | string | Unique ID of the input device. | +| ---------- | -------------------------- | ---------------------------------------------------- | +| 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. | +| sources | Array<[SourceType](#sourcetype)> | 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<[axisRanges](#axisrange)> | Axis information of the input device. | +| bus | number | Bus type of the input device. | +| product | number | Product information of the input device. | +| vendor | number | Vendor information of the input device. | +| version | number | Version information of the input device. | +| phys | string | Physical address of the input device. | +| uniq | string | Unique ID of the input device. | ## AxisType diff --git a/en/application-dev/reference/apis/js-apis-inputeventclient.md b/en/application-dev/reference/apis/js-apis-inputeventclient.md index ed3942bb59..4d6bf02375 100644 --- a/en/application-dev/reference/apis/js-apis-inputeventclient.md +++ b/en/application-dev/reference/apis/js-apis-inputeventclient.md @@ -1,17 +1,17 @@ # 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 -``` +```js import inputEventClient from '@ohos.multimodalInput.inputEventClient'; ``` @@ -32,14 +32,14 @@ Injects a key. **Example** -``` +```js let keyEvent = { isPressed: true, keyCode: 2, keyDownDuration: 0, isIntercepted: false } -res = inputEventClient.injectEvent({KeyEvent: keyEvent}); +let res = inputEventClient.injectEvent({KeyEvent: keyEvent}); ``` -- GitLab