diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 389f62a0139347e7ba83d2f08cc101962ecbab8f..e10019666ddd9e967e9eefb947365fc997357501 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. @@ -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", keyOptions: KeyOptions, 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", keyOptions: KeyOptions, callback?: Callback): void; } export default inputConsumer; \ No newline at end of file