harmony 鸿蒙Input Method Framework Subsystem – Input Method Framework Service Changelog

  • 2023-10-30
  • 浏览 (234)

Input Method Framework Subsystem – Input Method Framework Service Changelog

cl.imf.1 Addition of Synchronous APIs for InputClient

The synchronous APIs listed below are added.

API Description
getForwardSync(length:number): string Obtains the specific-length text before the cursor.
getBackwardSync(length:number): string Obtains the specific-length text after the cursor.
deleteForwardSync(length:number): void Deletes the fixed-length text before the cursor.
deleteBackwardSync(length:number): void Deletes the fixed-length text after the cursor.
insertTextSync(text: string): void Inserts text.
getEditorAttributeSync(): EditorAttribute Obtains the attribute of the edit box.
moveCursorSync(direction: number): void Moves the cursor.
selectByRangeSync(range: Range): void Selects text based on the specified range.
selectByMovementSync(movement: Movement): void Selects text based on the cursor movement direction.
getTextIndexAtCursorSync(): number Obtains the index of the text where the cursor is located.

Change Impact

The preceding APIs are synchronous APIs.

Adaptation Guide

Follow the description in @ohos.inputMethodEngine.d.ts

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙Application Access Control Subsystem Changelog

harmony 鸿蒙Account Subsystem Changelog

harmony 鸿蒙Bluetooth Subsystem Changelog

harmony 鸿蒙Bundle Management Subsystem Changelog

harmony 鸿蒙Security Subsystem Changelog

harmony 鸿蒙Graphics Subsystem Changelog

harmony 鸿蒙Telephony Subsystem Changelog

harmony 鸿蒙Wi-Fi Subsystem Changelog

0  赞