From e222e984750720c44e43095b0b966aee1825988e Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 26 Feb 2022 02:46:57 +0000 Subject: [PATCH 1/2] update input consumer Signed-off-by: mayunteng_1 Change-Id: Ibddfacb55172c096f3ef287b3dae3c26de3b4803 --- api/@ohos.multimodalInput.inputConsumer.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 389f62a013..2b3239b48c 100755 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { AsyncCallback } from './basic'; +import { Callback } from './basic'; /** * The event of key input management module is configured to subscribe and unsubscribe system keys. @@ -34,7 +34,7 @@ declare namespace inputConsumer { * @param isFinalKeyDown The final key press down or up. * @param finalKeyDownDuration Duration of final key press. */ - interface KeyOptions { + interface KeyOption { preKeys: Array; finalKey: number; isFinalKeyDown: boolean; @@ -47,11 +47,11 @@ declare namespace inputConsumer { * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @permission N/A - * @param type type of the keyevent about input which is to be subscribed. + * @param type type of the inputevent about input which is to be subscribed. * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function on(type: string, keyOption: KeyOptions, callback: AsyncCallback): void; + function on(type: "key", keyOption: KeyOption, callback: Callback): void; /** * Subscribe system keys. @@ -59,11 +59,11 @@ declare namespace inputConsumer { * @since 8 * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @permission N/A - * @param type type of the keyevent about input which is to be subscribed. + * @param type type of the inputevent about input which is to be subscribed. * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function off(type: string, keyOption: KeyOptions, callback: AsyncCallback): void; + function off(type: "key", keyOption: KeyOption, callback?: Callback): void; } export default inputConsumer; \ No newline at end of file -- Gitee From 58a1a12d445d8e754bbc68f76ff09cb2cc612bbf Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Mon, 28 Feb 2022 07:40:20 +0000 Subject: [PATCH 2/2] modify keyOption to keyOptions Signed-off-by: mayunteng_1 Change-Id: Ice99967a2a02cf6a26316981eca55f5d8edc10d8 --- api/@ohos.multimodalInput.inputConsumer.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 2b3239b48c..e10019666d 100755 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.d.ts @@ -34,7 +34,7 @@ declare namespace inputConsumer { * @param isFinalKeyDown The final key press down or up. * @param finalKeyDownDuration Duration of final key press. */ - interface KeyOption { + interface KeyOptions { preKeys: Array; finalKey: number; isFinalKeyDown: boolean; @@ -51,7 +51,7 @@ declare namespace inputConsumer { * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function on(type: "key", keyOption: KeyOption, callback: Callback): void; + function on(type: "key", keyOptions: KeyOptions, callback: Callback): void; /** * Subscribe system keys. @@ -63,7 +63,7 @@ declare namespace inputConsumer { * @param keyOption the key events about input which is to be subscribed. * @param callback callback function, receive reported data. */ - function off(type: "key", keyOption: KeyOption, callback?: Callback): void; + function off(type: "key", keyOptions: KeyOptions, callback?: Callback): void; } export default inputConsumer; \ No newline at end of file -- Gitee