From 90d03bddda94c264dabcdc418d73d45ebc081e95 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sat, 20 Aug 2022 16:38:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=94=AE=E7=9B=98=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I3512fc4a43d1a783d2ee696c70062e44c4471d39 --- api/@ohos.multimodalInput.inputDevice.d.ts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index ab4051ef4e..527eb3dec6 100755 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -69,6 +69,26 @@ declare namespace inputDevice { REMOTE_CONTROL = 5, } + /** + * @since 9 + */ + enum FunctionKey { + /** + * 大小写切换键 + */ + CAPSLOCK = 0, + + /** + * 小键盘使能键 + */ + NUMLOCK = 1, + + /** + * 滚动锁定键 + */ + SCROLLOCK = 2, + } + /** * Defines the listener for input device events. * @@ -262,6 +282,28 @@ declare namespace inputDevice { */ function getKeyboardType(deviceId: number, callback: AsyncCallback): void; function getKeyboardType(deviceId: number): Promise; + + /** + * 获取键盘设备指定功能按键的使能状态. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param key 功能按键的键值码. + * @return 返回指定功能按键的使能状态. + */ + function getFunctionKeyState(key: FunctionKey, callback: AsyncCallback): void; + function getFunctionKeyState(key: FunctionKey): Promise; + + /** + * 设置键盘设备指定功能键的使能状态. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param key 功能按键的键值码. + * @param state 待设置的使能状态 . + */ + function setFunctionKeyState(key: FunctionKey, state: boolean, callback: AsyncCallback): void; + function setFunctionKeyState(key: FunctionKey, state: boolean): Promise; } export default inputDevice; \ No newline at end of file -- Gitee From 9810c5cb0920e3fe9bc42b57f07ffaa68765a391 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Fri, 2 Sep 2022 09:17:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=94=AE=E4=BD=BF=E8=83=BD=E7=8A=B6=E6=80=81=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=92=8C=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I4bba5438be0d078640463de1ea25453fb85d8634 --- api/@ohos.multimodalInput.inputDevice.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index 527eb3dec6..139a11db8e 100755 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -70,7 +70,7 @@ declare namespace inputDevice { } /** - * @since 9 + * @since 10 */ enum FunctionKey { /** @@ -269,7 +269,7 @@ declare namespace inputDevice { * @param keys Key codes of the input device, You can query a maximum of five key codes at a time. * @return Returns a result indicating whether the specified key codes are supported. */ - function supportKeys(deviceId: number, keys: Array, callback: Callback>): void; + function supportKeys(deviceId: number, keys: Array, callback: AsyncCallback>): void; function supportKeys(deviceId: number, keys: Array): Promise>; /** @@ -286,7 +286,7 @@ declare namespace inputDevice { /** * 获取键盘设备指定功能按键的使能状态. * - * @since 9 + * @since 10 * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param key 功能按键的键值码. * @return 返回指定功能按键的使能状态. @@ -297,7 +297,7 @@ declare namespace inputDevice { /** * 设置键盘设备指定功能键的使能状态. * - * @since 9 + * @since 10 * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @param key 功能按键的键值码. * @param state 待设置的使能状态 . -- Gitee