• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.multimodalInput.touchEvent (Touch Event) (System API)
2
3The **touchEvent** module provides screen touch events reported by a device. It is inherited from [InputEvent](./js-apis-inputevent.md).
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 19. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8>
9> This topic describes only the system APIs provided by the module. For details about its public APIs, see [@ohos.multimodalInput.touchEvent (Touch Event)](js-apis-touchevent.md).
10
11## Modules to Import
12
13```js
14import { FixedMode, Touch, TouchEvent } from '@kit.InputKit';
15```
16
17## FixedMode
18
19Enumerates coordinate correction modes. This API takes effect only for mobile phones.
20
21**System capability**: SystemCapability.MultimodalInput.Input.Core
22
23**System API**: This is a system API.
24
25| Name         | Value | Description  |
26| ------------ | ------ | ---- |
27| NONE       |  0 | Normal mode.|
28| AUTO |  1 | One-handed mode.|
29
30## Touch
31
32Defines the touch point information.
33
34**System capability**: SystemCapability.MultimodalInput.Input.Core
35
36**System API**: This is a system API.
37
38| Name         | Type  | Read-Only  | Optional  | Description                                 |
39| ----------- | ------ | ---- | ---- | ----------------------------------- |
40| fixedDisplayX | number| No   | Yes   | **screenX** correction value in one-handed mode.<br> **NOTE**: This API takes effect only for mobile phones.|
41| fixedDisplayY | number| No   | Yes   | **screenY** correction value in one-handed mode.<br> **NOTE**: This API takes effect only for mobile phones.   |
42
43## TouchEvent
44
45Defines a touch event.
46
47**System capability**: SystemCapability.MultimodalInput.Input.Core
48
49**System API**: This is a system API.
50
51| Name        | Type      | Read-Only  | Optional  | Description       |
52| ---------- | ---------- | ---- | ---- | --------- |
53| fixedMode  | [FixedMode](#fixedmode)   | No   | Yes   | Defines the coordinate correction mode.<br> **NOTE**: This API takes effect only for mobile phones.|
54| isInject<sup>20+</sup>  | boolean   | No   | Yes   | Whether the touch event is an injection event. For details about injection events, see [@ohos.multimodalInput.inputEventClient](js-apis-inputeventclient-sys.md).<br> **NOTE**: This API takes effect only for mobile phones.|
55