From 39e29a28e97dfc5f057e9da507260fd304523e2d Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Wed, 16 Mar 2022 17:47:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0syscap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- api/@ohos.inputmethod.d.ts | 2 +- api/@ohos.inputmethodengine.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.inputmethod.d.ts b/api/@ohos.inputmethod.d.ts index 21a0439b5f..7fc8550488 100644 --- a/api/@ohos.inputmethod.d.ts +++ b/api/@ohos.inputmethod.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback} from './basic'; * inputmethod * * @since 8 - * @syscap SystemCapability.MiscServices.InputMethod + * @syscap SystemCapability.MiscServices.InputMethodFramework */ declare namespace inputMethod { const MAX_TYPE_NUM: number diff --git a/api/@ohos.inputmethodengine.d.ts b/api/@ohos.inputmethodengine.d.ts index 39b3b83bae..3fc9052d57 100644 --- a/api/@ohos.inputmethodengine.d.ts +++ b/api/@ohos.inputmethodengine.d.ts @@ -19,7 +19,7 @@ import {AsyncCallback} from './basic'; * inputmethodengine * * @since 8 - * @syscap SystemCapability.MiscServices.InputMethodEngine + * @syscap SystemCapability.MiscServices.InputMethodFramework */ declare namespace inputMethodEngine { const ENTER_KEY_TYPE_UNSPECIFIED: number; -- Gitee From 779cd880e48778f9d3d987f88fd51df7da96e72a Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Thu, 17 Mar 2022 09:26:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- api/@ohos.inputmethodengine.d.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/api/@ohos.inputmethodengine.d.ts b/api/@ohos.inputmethodengine.d.ts index 3fc9052d57..0f11096d63 100644 --- a/api/@ohos.inputmethodengine.d.ts +++ b/api/@ohos.inputmethodengine.d.ts @@ -68,13 +68,9 @@ declare namespace inputMethodEngine { off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void; - on(type: 'keyboardShow', callback: () => void): void; + on(type: 'keyboardShow|keyboardHide', callback: () => void): void; - off(type: 'keyboardShow', callback: () => void): void; - - on(type: 'keyboardHide', callback: () => void): void; - - off(type: 'keyboardHide', callback: () => void): void; + off(type: 'keyboardShow|keyboardHide', callback?: () => void): void; } interface TextInputClient { @@ -104,13 +100,9 @@ declare namespace inputMethodEngine { } interface KeyboardDelegate { - on(type: 'keyDown', callback: (event: KeyEvent) => boolean): void; - - off(type: 'keyDown', callback?: (event: KeyEvent) => boolean): void; + on(type: 'keyDown|keyUp', callback: (event: KeyEvent) => boolean): void; - on(type: 'keyUp', callback: (event: KeyEvent) => boolean): void; - - off(type: 'keyUp', callback?: (event: KeyEvent) => boolean): void; + off(type: 'keyDown|keyUp', callback?: (event: KeyEvent) => boolean): void; on(type: 'cursorContextChange', callback: (x: number, y: number, height: number) => void): void; @@ -129,6 +121,11 @@ declare namespace inputMethodEngine { readonly inputPattern: number; readonly enterKeyType: number; } + + interface KeyEvent { + readonly keyCode: number; + readonly keyAction: number; + } } export default inputMethodEngine; -- Gitee From af989c6f8239fe29aa77de491a06dc057f5af6a7 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Thu, 17 Mar 2022 09:37:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- api/@ohos.inputmethod.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.inputmethod.d.ts b/api/@ohos.inputmethod.d.ts index 7fc8550488..2ec69c2eeb 100644 --- a/api/@ohos.inputmethod.d.ts +++ b/api/@ohos.inputmethod.d.ts @@ -18,7 +18,7 @@ import {AsyncCallback} from './basic'; /** * inputmethod * - * @since 8 + * @since 6 * @syscap SystemCapability.MiscServices.InputMethodFramework */ declare namespace inputMethod { -- Gitee