harmony 鸿蒙Input Method Framework Subsystem – Input Method Framework Service Changelog
Input Method Framework Subsystem – Input Method Framework Service Changelog
cl.imf.1 Change of the Error Code Returned When Permission Verification of on(‘imeShow’) Fails
Change Impact
For the on(‘imeShow’) API, the return code for system permission verification failure is changed from 201 to 202.
cl.imf.2 Change of the Error Code Returned When Permission Verification of on(‘imeHide’) Fails
Change Impact
For the on(‘imeHide’) API, the return code for system permission verification failure is changed from 201 to 202.
cl.imf.3 Parameter Addition of off
An option callback parameter is added to the off API to specify the callback to be unsubscribed from. Its value must be the same as that passed in the on API.
API | Before Change | After Change |
---|---|---|
off(‘insertText’) | off(type: ‘insertText’): void | off(type: ‘insertText’, callback?: (text: string) => void): void |
off(‘deleteLeft’) | off(type: ‘deleteLeft’): void | off(type: ‘deleteLeft’, callback?: (length: number) => void): void |
off(‘deleteRight’) | off(type: ‘deleteRight’): void | off(type: ‘deleteRight’, callback?: (length: number) => void): void |
off(‘sendKeyboardStatus’) | off(type: ‘sendKeyboardStatus’): void | off(type: ‘sendKeyboardStatus’, callback?: (keyboardStatus: KeyboardStatus) => void): void |
off(‘sendFunctionKey’) | off(type: ‘sendFunctionKey’): void | off(type: ‘sendFunctionKey’, callback?: (functionKey: FunctionKey) => void): void |
off(‘moveCursor’) | off(type: ‘moveCursor’): void | off(type: ‘moveCursor’, callback?: (direction: Direction) => void): void |
off(‘handleExtendAction’) | off(type: ‘handleExtendAction’): void | off(type: ‘handleExtendAction’, callback?: (action: ExtendAction) => void): void |
off(‘selectByRange’) | off(type: ‘selectByRange’): void | off(type: ‘selectByRange’, callback?: Callback<Range>): void |
off(‘selectByMovement’) | off(type: ‘selectByMovement’): void | off(type: ‘selectByMovement’, callback?: Callback<Movement>): void |
Change Impact
When calling the preceding APIs, you can pass the callback parameter to specify the callback to unsubscribe from. If this parameter is not passed, all callbacks corresponding to the specified type are unsubscribed from.
Adaptation Guide
Follow the description in @ohos.inputMethod.d.ts.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ArkUI Subsystem Changelog
harmony 鸿蒙Device Management Changelog
harmony 鸿蒙Location Subsystem Changelog
harmony 鸿蒙Multimedia Subsystem Changelog
harmony 鸿蒙Theme Framework Subsystem – Screen Lock Management Service Changelog
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦