未验证 提交 02363527 编写于 作者: O openharmony_ci 提交者: Gitee

!5612 翻译已完成5150

Merge pull request !5612 from shawn_he/5150-a
...@@ -121,17 +121,17 @@ Defines the information about an input device. ...@@ -121,17 +121,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<[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.| | 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. | | axisRanges | Array<[axisRanges](#axisrange)> | 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.
先完成此消息的编辑!
想要评论请 注册