1# Input Method Framework Subsystem – Input Method Framework Service Changelog 2 3## cl.imf.1 Change of the Error Code Returned When Permission Verification of on('imeShow') Fails 4 5**Change Impact** 6 7For the **on('imeShow')** API, the return code for system permission verification failure is changed from 201 to 202. 8 9## cl.imf.2 Change of the Error Code Returned When Permission Verification of on('imeHide') Fails 10 11**Change Impact** 12 13For the **on('imeHide')** API, the return code for system permission verification failure is changed from 201 to 202. 14 15## cl.imf.3 Parameter Addition of off 16 17An 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. 18 19| API | Before Change | After Change | 20| ------------------------- | ------------------------------------- | ------------------------------------------------------------ | 21| off('insertText') | off(type: 'insertText'): void | off(type: 'insertText', callback?: (text: string) => void): void | 22| off('deleteLeft') | off(type: 'deleteLeft'): void | off(type: 'deleteLeft', callback?: (length: number) => void): void | 23| off('deleteRight') | off(type: 'deleteRight'): void | off(type: 'deleteRight', callback?: (length: number) => void): void | 24| off('sendKeyboardStatus') | off(type: 'sendKeyboardStatus'): void | off(type: 'sendKeyboardStatus', callback?: (keyboardStatus: KeyboardStatus) => void): void | 25| off('sendFunctionKey') | off(type: 'sendFunctionKey'): void | off(type: 'sendFunctionKey', callback?: (functionKey: FunctionKey) => void): void | 26| off('moveCursor') | off(type: 'moveCursor'): void | off(type: 'moveCursor', callback?: (direction: Direction) => void): void | 27| off('handleExtendAction') | off(type: 'handleExtendAction'): void | off(type: 'handleExtendAction', callback?: (action: ExtendAction) => void): void | 28| off('selectByRange') | off(type: 'selectByRange'): void | off(type: 'selectByRange', callback?: Callback\<Range\>): void | 29| off('selectByMovement') | off(type: 'selectByMovement'): void | off(type: 'selectByMovement', callback?: Callback\<Movement\>): void | 30 31**Change Impact** 32 33When 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. 34 35**Adaptation Guide** 36 37Follow the description in [@ohos.inputMethod.d.ts](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-inputmethod.md). 38