openharmony 鸿蒙 js-apis-touchevent-sys

2026-08-25 浏览 (1)

@ohos.multimodalInput.touchEvent (Touch Event) (System API)

The touchEvent module provides touch events reported by a device. It is inherited from InputEvent.

NOTE

  • 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.

  • This topic describes only the system APIs provided by the module. For details about its public APIs, see @ohos.multimodalInput.touchEvent (Touch Event).

Modules to Import

import { FixedMode, Touch, TouchEvent } from '@kit.InputKit';

FixedMode

Enumerates coordinate correction modes.

System capability: SystemCapability.MultimodalInput.Input.Core

System API: This is a system API.

NameValueDescription
NONE0Normal mode.
AUTO1One-handed mode.

Touch

Defines the touch point information.

System capability: SystemCapability.MultimodalInput.Input.Core

System API: This is a system API.

NameTypeRead-OnlyOptionalDescription
fixedDisplayXnumberNoYesscreenX correction value in one-handed mode.
fixedDisplayYnumberNoYesscreenY correction value in one-handed mode.
blobId24+numberNoYesTouch point attribute ID. Currently, only single-finger touch is supported. The value 1 indicates left-hand touch, and the value 2 indicates right-hand touch.

TouchEvent

Defines a touch event.

System capability: SystemCapability.MultimodalInput.Input.Core

System API: This is a system API.

NameTypeRead-OnlyOptionalDescription
fixedModeFixedModeNoYesCoordinate correction mode.
isInject20+booleanNoYesWhether the touch event is an injection event. For details about injection events, see @ohos.multimodalInput.inputEventClient.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-input-input-cursorinfo

openharmony 鸿蒙 js-apis-inputevent

openharmony 鸿蒙 js-apis-infraredemitter

openharmony 鸿蒙 js-apis-inputeventclient-sys

openharmony 鸿蒙 capi-input-input-keystate

openharmony 鸿蒙 js-apis-keycode

openharmony 鸿蒙 capi-input-input-axisevent

openharmony 鸿蒙 js-apis-pointer-sys

openharmony 鸿蒙 js-apis-inputmonitor-sys

openharmony 鸿蒙 capi-input-input-devicelistener

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/Ca8NS1Qf