js-apis-inputevent.md 1004 字节
Newer Older
S
shawn_he 已提交
1
# @ohos.multimodalInput.inputEvent (Input Event)
S
shawn_he 已提交
2

S
shawn_he 已提交
3
The **inputEvent** module provides the basic events reported by the device.
S
shawn_he 已提交
4

S
shawn_he 已提交
5 6
>  **NOTE**
>
S
shawn_he 已提交
7 8 9 10 11 12 13 14
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.

## Modules to Import

```js
import InputEvent from '@ohos.multimodalInput.inputEvent';
```

S
shawn_he 已提交
15 16
## InputEvent 

S
shawn_he 已提交
17
Represents an input event.
S
shawn_he 已提交
18

S
shawn_he 已提交
19 20
**System capability**: SystemCapability.MultimodalInput.Input.Core

S
shawn_he 已提交
21 22 23 24 25 26 27
| Name        | Type  | Readable  | Writable  | Description            |
| ---------- | ------ | ---- | ---- | -------------- |
| id         | number | Yes   | No   | Event ID.|
| deviceId   | number | Yes   | No   | ID of the device that reports the input event.   |
| actionTime | number | Yes   | No   | Time when the input event is reported.     |
| screenId   | number | Yes   | No   | ID of the target screen.        |
| windowId   | number | Yes   | No   | ID of the target window.        |