openharmony 鸿蒙 js-apis-intentioncode

2025-06-12 浏览 (1)

@ohos.multimodalInput.intentionCode (Intention Code)

The intentionCode module maps the original events of the keyboard to intention codes for normalized interaction. For example, if the mapped event of the space bar on the keyboard is INTENTION_SELECT, the intent is to select an item.

NOTE

The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import { IntentionCode } from '@kit.InputKit';

IntentionCode

Enumerates intention codes.

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.MultimodalInput.Input.Core

NameValueDescription
INTENTION_UNKNOWN-1Unknown intent
INTENTION_UP1Up
INTENTION_DOWN2Down
INTENTION_LEFT3Left
INTENTION_RIGHT4Right
INTENTION_SELECT5Select
INTENTION_ESCAPE6Escape
INTENTION_BACK7Back
INTENTION_FORWARD8Forward
INTENTION_MENU9Menu
INTENTION_PAGE_UP11Page up
INTENTION_PAGE_DOWN12Page down
INTENTION_ZOOM_OUT13Zoom out
INTENTION_ZOOM_IN14Zoom in

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Input Kit

harmony 鸿蒙Input_DeviceListener

harmony 鸿蒙Input_InterceptorEventCallback

harmony 鸿蒙Input_AxisEvent

harmony 鸿蒙Input_DeviceInfo

harmony 鸿蒙Input_DeviceListener

harmony 鸿蒙Input_Hotkey

harmony 鸿蒙Input_InterceptorEventCallback

harmony 鸿蒙Input_InterceptorOptions

harmony 鸿蒙Input_KeyEvent

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