diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md index 2a43022fbd1568727c25df6b532183ddd287f883..b374bd9f820a06f6a60c5abe0e5e20714dc44bb9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md @@ -1821,7 +1821,7 @@ inputMethodController.off('deleteRight'); ### on('sendKeyboardStatus')10+ -on(type: 'sendKeyboardStatus', callback: (keyBoardStatus: KeyboardStatus) => void): void +on(type: 'sendKeyboardStatus', callback: (keyboardStatus: KeyboardStatus) => void): void 订阅输入法应用发送键盘状态事件。使用callback异步回调。 @@ -1832,7 +1832,7 @@ on(type: 'sendKeyboardStatus', callback: (keyBoardStatus: KeyboardStatus) => voi | 参数名 | 类型 | 必填 | 说明 | | -------- | ------ | ---- | ---- | | type | string | 是 | 设置监听类型。
- type为‘sendKeyboardStatus’时表示订阅输入法应用发送键盘状态事件监听。 | -| callback | (keyBoardStatus: [KeyboardStatus](#keyboardstatus10)) => void | 是 | 回调函数,返回键盘状态。
开发者需要在回调函数中根据传入的键盘状态做相应动作。 | +| callback | (keyboardStatus: [KeyboardStatus](#keyboardstatus10)) => void | 是 | 回调函数,返回键盘状态。
开发者需要在回调函数中根据传入的键盘状态做相应动作。 | **错误码:** @@ -1846,8 +1846,8 @@ on(type: 'sendKeyboardStatus', callback: (keyBoardStatus: KeyboardStatus) => voi ```js try { - inputMethodController.on('sendKeyboardStatus', (keyBoardStatus) => { - console.log(`Succeeded in subscribing sendKeyboardStatus, keyBoardStatus: ${keyBoardStatus}`); + inputMethodController.on('sendKeyboardStatus', (keyboardStatus) => { + console.log(`Succeeded in subscribing sendKeyboardStatus, keyboardStatus: ${keyboardStatus}`); }); } catch(err) { console.error(`Failed to subscribe sendKeyboardStatus: ${JSON.stringify(err)}`); @@ -1856,7 +1856,7 @@ try { ### off('sendKeyboardStatus')10+ -off(type: 'sendKeyboardStatus', callback?: (keyBoardStatus: KeyboardStatus) => void): void +off(type: 'sendKeyboardStatus', callback?: (keyboardStatus: KeyboardStatus) => void): void 取消订阅输入法应用发送键盘状态事件。 @@ -1867,13 +1867,13 @@ off(type: 'sendKeyboardStatus', callback?: (keyBoardStatus: KeyboardStatus) => v | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | 是 | 设置监听类型。
- type为‘sendKeyboardStatus’时表示取消订阅输入法应用发送键盘状态事件监听。 | -| callback | (keyBoardStatus: [KeyboardStatus](#keyboardstatus10)) => void | 否 | 取消订阅的回调函数,需要与on接口传入的保持一致。当该参数不填写时,取消订阅type对应的所有回调事件。 | +| callback | (keyboardStatus: [KeyboardStatus](#keyboardstatus10)) => void | 否 | 取消订阅的回调函数,需要与on接口传入的保持一致。当该参数不填写时,取消订阅type对应的所有回调事件。 | **示例:** ```js -let onSendKeyboardStatus = (keyBoardStatus: KeyboardStatus) => { - console.log(`Succeeded in subscribing sendKeyboardStatus, keyBoardStatus: ${keyBoardStatus}`); +let onSendKeyboardStatus = (keyboardStatus: KeyboardStatus) => { + console.log(`Succeeded in subscribing sendKeyboardStatus, keyboardStatus: ${keyboardStatus}`); }; inputMethodController.off('sendKeyboardStatus', onSendKeyboardStatus); inputMethodController.off('sendKeyboardStatus'); @@ -2935,4 +2935,4 @@ inputMethodSetting.displayOptionalInputMethod().then(() => { }).catch((err) => { console.error(`Failed to displayOptionalInputMethod: ${JSON.stringify(err)}`); }) -``` +``` \ No newline at end of file diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-imf.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-imf.md index f258d54766f13f32aace584f57fd447e73b0f8b0..3463f9c6366a3d8b3e67c5117c2b29211825da8b 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-imf.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-imf.md @@ -21,9 +21,10 @@ off接口新增需要取消订阅的回调函数作为可选参数,需要与on | 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('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\): void | | off('selectByMovement') | off(type: 'selectByMovement'): void | off(type: 'selectByMovement', callback?: Callback\): void |