From 6c2131c72857d1a5c40430fd408dd92ddc231274 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Mon, 11 Mar 2024 13:52:23 +0000 Subject: [PATCH 01/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: Iaaff0f8e4b8523042ed0a9ec354c87285b888ca0 --- multimodalinput/kits/c/BUILD.gn | 35 ++ .../kits/c/input/native_input_manager.h | 183 ++++++++++ .../kits/c/input/native_key_code.h | 320 ++++++++++++++++++ multimodalinput/kits/c/ohinput.ndk.json | 38 +++ 4 files changed, 576 insertions(+) create mode 100644 multimodalinput/kits/c/BUILD.gn create mode 100644 multimodalinput/kits/c/input/native_input_manager.h create mode 100644 multimodalinput/kits/c/input/native_key_code.h create mode 100644 multimodalinput/kits/c/ohinput.ndk.json diff --git a/multimodalinput/kits/c/BUILD.gn b/multimodalinput/kits/c/BUILD.gn new file mode 100644 index 000000000..fd08d9574 --- /dev/null +++ b/multimodalinput/kits/c/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") +import("//foundation/multimodalinput/input/multimodalinput_mini.gni") + +ohos_ndk_headers("ohinput_header") { + dest_dir = "$ndk_headers_out_dir/multimodalinput" + sources = [ + "./input/native_input_manager.h", + "./input/native_key_code.h", + ] +} + +ohos_ndk_library("libohinput_ndk") { + output_name = "ohinput" + output_extension = "so" + ndk_description_file = "./ohinput.ndk.json" + system_capability = "SystemCapability.MultimodalInput.Input.Core" + system_capability_headers = [ + "multimodalinput/native_input_manager.h", + "multimodalinput/native_key_code.h", + ] +} diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h new file mode 100644 index 000000000..432b2b18f --- /dev/null +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef NATIVE_INPUT_MANAGER_H +#define NATIVE_INPUT_MANAGER_H + +/** + * @addtogroup OHInput + * @{ + * + * @brief Provides the C interface in the multi-modal input domain. + * + * @since 12 + */ + + +/** + * @file native_input_manager.h + * + * @brief Provides capabilities such as event injection and key status query. + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @library libohinput.so + * @since 12 + */ + +#include +#include "native_key_code.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerated values of key event action. + * + * @since 12 + */ +enum { + /** Cancel */ + KEY_DEFAULT = -1, + /** Cancellation of a key action */ + KEY_PRESSED = 0, + /** Pressing of a key */ + KEY_NOT_PRESSED = 1, +}; + +/** + * @brief 按键开关状态,包括使能和去使能,比如caplock键切换大小写。 + * + * @since 12 + */ +enum { + /** 按键开关使能 */ + KEY_SWITCH_ENABLE = 0, + /** 按键开关去使能 */ + KEY_SWITCH_DISABLE = 1, +}; + +/** + * @brief Defines key information, which identifies a key pressing behavior. For example, the Ctrl key information contains the key value and key type. + * + * @since 12 + */ +struct Input_KeyState; + +/** + * @brief Enumerates the error codes. + * + * @since 12 + */ +typedef enum { + /** Success */ + SUCCESS = 0, + /** Permission verification failed */ + PERMISSION_REFUSED = 201, + /** Non-system application */ + NOT_SYSTEM_APPLICATION= 202, + /** Parameter check failed */ + PARAMETER_ERROR = 401, + +} Input_ErrorCode; + +/** + * @brief Queries the key status. + * + * @param keyStatus Key status. + * @param len Number of keys to be queried. + * @return SUCCESS - Success. + * PARAMETER_ERROR - Parameter error. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +Input_ErrorCode OH_Input_GetKeyState(struct Input_KeyState* keyState); + +/** + * @brief 创建按键状态枚举对象. + * + * @return Returns an {@link Input_KeyState} pointer object if the operation is successful + * returns a null pointer otherwise. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +struct Input_KeyState* OH_Input_CreateKeyState(); + +/** + * @brief 销毁按键状态枚举对象。 + * @param keyState 按键状态枚举对象. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +void OH_Input_DestroyKeyState(struct Input_KeyState* keyState); + +/** + * @brief 设置按键状态对象的键值。 + * @param keyState 按键状态枚举对象. + * @param keyCode 按键键值 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +void OH_Input_SetKeyCode(struct Input_KeyState* keyState, int32_t keyCode); + +/** + * @brief 获取按键状态对象的键值。 + * @param keyState 按键状态枚举对象. + * @return 返回按键状态对象的键值。 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +int32_t OH_Input_GetKeyCode(struct Input_KeyState* keyState); + +/** + * @brief 设置按键状态对象的按键是否按下。 + * @param keyState 按键状态枚举对象. + * @param keyAction 按键是否按下 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +void OH_Input_SetKeyPressed(struct Input_KeyState* keyState, int32_t keyAction); + +/** + * @brief 获取按键状态对象的按键是否按下。 + * @param keyState 按键状态枚举对象. + * @return 返回按键状态对象的按键按下状态。 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +int32_t OH_Input_GetKeyPressed(struct Input_KeyState* keyState); + +/** + * @brief 设置按键状态对象的按键开关。 + * @param keyState 按键状态枚举对象. + * @param keySwitch 按键开关 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +void OH_Input_SetKeySwitch(struct Input_KeyState* keyState, int32_t keySwitch); + +/** + * @brief 获取按键状态对象的按键开关。 + * @param keyState 按键状态枚举对象. + * @return 返回按键状态对象的按键开关。 + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 12 + */ +int32_t OH_Input_GetKeySwitch(struct Input_KeyState* keyState); + +#ifdef __cplusplus +} +#endif +#endif // NATIVE_INPUT_MANAGER_H diff --git a/multimodalinput/kits/c/input/native_key_code.h b/multimodalinput/kits/c/input/native_key_code.h new file mode 100644 index 000000000..c2086fe00 --- /dev/null +++ b/multimodalinput/kits/c/input/native_key_code.h @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef NATIVE_KEY_CODE_H +#define NATIVE_KEY_CODE_H + +/** + * @addtogroup OHInput + * @{ + * + * @brief Provides the C interface in the multi-modal input domain. + * + * @since 12 + */ + +/** + * @file native_key_code.h + * + * @brief Defines the key event structure and related enumeration values. + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @library libohinput.so + * @since 12 + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerated values of OpenHarmony key code. + * + * @since 12 + */ +typedef enum { + /** Function (Fn) key */ + KEYCODE_FN = 0, + /** Volume Up key */ + KEYCODE_VOLUME_UP = 16, + /** Volume Down button */ + KEYCODE_VOLUME_DOWN = 17, + /** Power key */ + KEYCODE_POWER = 18, + /** Shutter key */ + KEYCODE_CAMERA = 19, + /** Speaker Mute key */ + KEYCODE_VOLUME_MUTE = 22, + /** Mute key */ + KEYCODE_MUTE = 23, + /** Brightness Up key */ + KEYCODE_BRIGHTNESS_UP = 40, + /** Brightness Down key */ + KEYCODE_BRIGHTNESS_DOWN = 41, + /** Key 0 */ + KEYCODE_0 = 2000, + /** Key 1 */ + KEYCODE_1 = 2001, + /** Key 2 */ + KEYCODE_2 = 2002, + /** Key 3 */ + KEYCODE_3 = 2003, + /** Key 4 */ + KEYCODE_4 = 2004, + /** Key 5 */ + KEYCODE_5 = 2005, + /** Key 6 */ + KEYCODE_6 = 2006, + /** Key 7 */ + KEYCODE_7 = 2007, + /** Key 8 */ + KEYCODE_8 = 2008, + /** Key 9 */ + KEYCODE_9 = 2009, + /** Key * */ + KEYCODE_STAR = 2010, + /** Key # */ + KEYCODE_POUND = 2011, + /** Up key on D-pad */ + KEYCODE_DPAD_UP = 2012, + /** Down key on D-pad */ + KEYCODE_DPAD_DOWN = 2013, + /** Left key on D-pad */ + KEYCODE_DPAD_LEFT = 2014, + /** Right key on D-pad */ + KEYCODE_DPAD_RIGHT = 2015, + /** OK key on D-pad */ + KEYCODE_DPAD_CENTER = 2016, + /** Key A */ + KEYCODE_A = 2017, + /** Key B */ + KEYCODE_B = 2018, + /** Key C */ + KEYCODE_C = 2019, + /** Key D */ + KEYCODE_D = 2020, + /** Key E */ + KEYCODE_E = 2021, + /** Key F */ + KEYCODE_F = 2022, + /** Key G */ + KEYCODE_G = 2023, + /** Key H */ + KEYCODE_H = 2024, + /** Key I */ + KEYCODE_I = 2025, + /** Key J */ + KEYCODE_J = 2026, + /** Key K */ + KEYCODE_K = 2027, + /** Key L */ + KEYCODE_L = 2028, + /** Key M */ + KEYCODE_M = 2029, + /** Key N */ + KEYCODE_N = 2030, + /** Key O */ + KEYCODE_O = 2031, + /** Key P */ + KEYCODE_P = 2032, + /** Key Q */ + KEYCODE_Q = 2033, + /** Key R */ + KEYCODE_R = 2034, + /** Key S */ + KEYCODE_S = 2035, + /** Key T */ + KEYCODE_T = 2036, + /** Key U */ + KEYCODE_U = 2037, + /** Key V */ + KEYCODE_V = 2038, + /** Key W */ + KEYCODE_W = 2039, + /** Key X */ + KEYCODE_X = 2040, + /** Key Y */ + KEYCODE_Y = 2041, + /** Key Z */ + KEYCODE_Z = 2042, + /** Key , */ + KEYCODE_COMMA = 2043, + /** Key . */ + KEYCODE_PERIOD = 2044, + /** Left Alt key */ + KEYCODE_ALT_LEFT = 2045, + /** Right Alt key */ + KEYCODE_ALT_RIGHT = 2046, + /** Left Shift key */ + KEYCODE_SHIFT_LEFT = 2047, + /** Right Shift key */ + KEYCODE_SHIFT_RIGHT = 2048, + /** Tab key */ + KEYCODE_TAB = 2049, + /** Space key */ + KEYCODE_SPACE = 2050, + /** Symbol key */ + KEYCODE_SYM = 2051, + /** Explorer key, used to start the explorer application */ + KEYCODE_EXPLORER = 2052, + /** Email key, used to start the email application */ + KEYCODE_ENVELOPE = 2053, + /** Enter key */ + KEYCODE_ENTER = 2054, + /** Backspace key */ + KEYCODE_DEL = 2055, + /** Key * */ + KEYCODE_GRAVE = 2056, + /** Key - */ + KEYCODE_MINUS = 2057, + /** Key = */ + KEYCODE_EQUALS = 2058, + /** Key [ */ + KEYCODE_LEFT_BRACKET = 2059, + /** Key ] */ + KEYCODE_RIGHT_BRACKET = 2060, + /** Key \ */ + KEYCODE_BACKSLASH = 2061, + /** Key ; */ + KEYCODE_SEMICOLON = 2062, + /** Key ' */ + KEYCODE_APOSTROPHE = 2063, + /** Key / */ + KEYCODE_SLASH = 2064, + /** Key @ */ + KEYCODE_AT = 2065, + /** Key + */ + KEYCODE_PLUS = 2066, + /** Menu key */ + KEYCODE_MENU = 2067, + /** Page Up key */ + KEYCODE_PAGE_UP = 2068, + /** Page Down key */ + KEYCODE_PAGE_DOWN = 2069, + /** ESC key */ + KEYCODE_ESCAPE = 2070, + /** Delete key */ + KEYCODE_FORWARD_DEL = 2071, + /** Left Ctrl key */ + KEYCODE_CTRL_LEFT = 2072, + /** Right Ctrl key */ + KEYCODE_CTRL_RIGHT = 2073, + /** Caps Lock key */ + KEYCODE_CAPS_LOCK = 2074, + /** Scroll Lock key */ + KEYCODE_SCROLL_LOCK = 2075, + /** Left Meta key */ + KEYCODE_META_LEFT = 2076, + /** Right Meta key */ + KEYCODE_META_RIGHT = 2077, + /** Function key */ + KEYCODE_FUNCTION = 2078, + /** System Request/Print Screen key */ + KEYCODE_SYSRQ = 2079, + /** Break/Pause key */ + KEYCODE_BREAK = 2080, + /** Move to Home key */ + KEYCODE_MOVE_HOME = 2081, + /** Move to End key */ + KEYCODE_MOVE_END = 2082, + /** Insert key */ + KEYCODE_INSERT = 2083, + /** Forward key */ + KEYCODE_FORWARD = 2084, + /** Play key */ + KEYCODE_MEDIA_PLAY = 2085, + /** Pause key */ + KEYCODE_MEDIA_PAUSE = 2086, + /** Close key */ + KEYCODE_MEDIA_CLOSE = 2087, + /** Eject key */ + KEYCODE_MEDIA_EJECT = 2088, + /** Record key */ + KEYCODE_MEDIA_RECORD = 2089, + /** F1 key */ + KEYCODE_F1 = 2090, + /** F2 key */ + KEYCODE_F2 = 2091, + /** F3 key */ + KEYCODE_F3 = 2092, + /** F4 key */ + KEYCODE_F4 = 2093, + /** F5 key */ + KEYCODE_F5 = 2094, + /** F6 key */ + KEYCODE_F6 = 2095, + /** F7 key */ + KEYCODE_F7 = 2096, + /** F8 key */ + KEYCODE_F8 = 2097, + /** F9 key */ + KEYCODE_F9 = 2098, + /** F10 key */ + KEYCODE_F10 = 2099, + /** F11 key */ + KEYCODE_F11 = 2100, + /** F12 key */ + KEYCODE_F12 = 2101, + /** Number Lock key on numeric keypad */ + KEYCODE_NUM_LOCK = 2102, + /** Key 0 on numeric keypad */ + KEYCODE_NUMPAD_0 = 2103, + /** Key 1 on numeric keypad */ + KEYCODE_NUMPAD_1 = 2104, + /** Key 2 on numeric keypad */ + KEYCODE_NUMPAD_2 = 2105, + /** Key 3 on numeric keypad */ + KEYCODE_NUMPAD_3 = 2106, + /** Key 4 on numeric keypad */ + KEYCODE_NUMPAD_4 = 2107, + /** Key 5 on numeric keypad */ + KEYCODE_NUMPAD_5 = 2108, + /** Key 6 on numeric keypad */ + KEYCODE_NUMPAD_6 = 2109, + /** Key 7 on numeric keypad */ + KEYCODE_NUMPAD_7 = 2110, + /** Key 8 on numeric keypad */ + KEYCODE_NUMPAD_8 = 2111, + /** Key 9 on numeric keypad */ + KEYCODE_NUMPAD_9 = 2112, + /** Key / on numeric keypad */ + KEYCODE_NUMPAD_DIVIDE = 2113, + /** Key * on numeric keypad */ + KEYCODE_NUMPAD_MULTIPLY = 2114, + /** Key - on numeric keypad */ + KEYCODE_NUMPAD_SUBTRACT = 2115, + /** Key + on numeric keypad */ + KEYCODE_NUMPAD_ADD = 2116, + /** Key . on numeric keypad */ + KEYCODE_NUMPAD_DOT = 2117, + /** Key , on numeric keypad */ + KEYCODE_NUMPAD_COMMA = 2118, + /** Enter key on numeric keypad */ + KEYCODE_NUMPAD_ENTER = 2119, + /** Key = on numeric keypad */ + KEYCODE_NUMPAD_EQUALS = 2120, + /** Key ( on numeric keypad */ + KEYCODE_NUMPAD_LEFT_PAREN = 2121, + /** Key ) on numeric keypad */ + KEYCODE_NUMPAD_RIGHT_PAREN = 2122 +} Input_KeyCode; + +#ifdef __cplusplus +} +#endif + +#endif // NATIVE_KEY_CODE_H diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json new file mode 100644 index 000000000..104153c65 --- /dev/null +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -0,0 +1,38 @@ +[ + { + "first_introduced": "12", + "name": "OH_Input_GetKeyState" + }, + { + "first_introduced": "12", + "name": "OH_Input_CreateKeyState" + }, + { + "first_introduced": "12", + "name": "OH_Input_DestroyKeyState" + }, + { + "first_introduced": "12", + "name": "OH_Input_SetKeyCode" + }, + { + "first_introduced": "12", + "name": "OH_Input_GetKeyCode" + }, + { + "first_introduced": "12", + "name": "OH_Input_SetKeyPressed" + }, + { + "first_introduced": "12", + "name": "OH_Input_GetKeyPressed" + }, + { + "first_introduced": "12", + "name": "OH_Input_SetKeySwitch" + }, + { + "first_introduced": "12", + "name": "OH_Input_GetKeySwitch" + } +] \ No newline at end of file -- Gitee From 62e71197d5d8a8af8ddefc492b5cb1f931a71a0d Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Mon, 11 Mar 2024 13:56:10 +0000 Subject: [PATCH 02/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: I74b8f4b0432b2459cae0141168e0cec06030e0ec --- multimodalinput/kits/c/input/native_input_manager.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h index 432b2b18f..f3227d8af 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -49,11 +49,11 @@ extern "C" { * @since 12 */ enum { - /** Cancel */ + /** Default */ KEY_DEFAULT = -1, - /** Cancellation of a key action */ - KEY_PRESSED = 0, /** Pressing of a key */ + KEY_PRESSED = 0, + /** Release of a key */ KEY_NOT_PRESSED = 1, }; @@ -96,8 +96,7 @@ typedef enum { /** * @brief Queries the key status. * - * @param keyStatus Key status. - * @param len Number of keys to be queried. + * @param keyState Key state. * @return SUCCESS - Success. * PARAMETER_ERROR - Parameter error. * @syscap SystemCapability.MultimodalInput.Input.Core -- Gitee From 02cf5a82e5b101a7bcc503b73936240febf9faa8 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 01:31:28 +0000 Subject: [PATCH 03/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: I27d7ba63728b6ad579e56617292990c0d6da6116 --- .../kits/c/input/native_input_manager.h | 99 +++++++++---------- .../kits/c/input/native_key_code.h | 7 +- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h index f3227d8af..d2cde42cb 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -17,7 +17,7 @@ #define NATIVE_INPUT_MANAGER_H /** - * @addtogroup OHInput + * @addtogroup input * @{ * * @brief Provides the C interface in the multi-modal input domain. @@ -25,14 +25,13 @@ * @since 12 */ - /** * @file native_input_manager.h * * @brief Provides capabilities such as event injection and key status query. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @library libohinput.so + * @library libnative_input.so * @since 12 */ @@ -48,25 +47,17 @@ extern "C" { * * @since 12 */ -enum { +enum Input_KeyStateAction { /** Default */ KEY_DEFAULT = -1, /** Pressing of a key */ - KEY_PRESSED = 0, + KEY_RELEASED = 0, /** Release of a key */ - KEY_NOT_PRESSED = 1, -}; - -/** - * @brief 按键开关状态,包括使能和去使能,比如caplock键切换大小写。 - * - * @since 12 - */ -enum { - /** 按键开关使能 */ - KEY_SWITCH_ENABLE = 0, - /** 按键开关去使能 */ - KEY_SWITCH_DISABLE = 1, + KEY_PRESSED = 1, + /** Key switch enabled */ + KEY_SWITCH_ON = 2, + /** Key switch disabled */ + KEY_SWITCH_OFF = 3 }; /** @@ -83,31 +74,30 @@ struct Input_KeyState; */ typedef enum { /** Success */ - SUCCESS = 0, + INPUT_SUCCESS = 0, /** Permission verification failed */ - PERMISSION_REFUSED = 201, + INPUT_PERMISSION_DENIED = 201, /** Non-system application */ - NOT_SYSTEM_APPLICATION= 202, + INPUT_NOT_SYSTEM_APPLICATION= 202, /** Parameter check failed */ - PARAMETER_ERROR = 401, - -} Input_ErrorCode; + INPUT_PARAMETER_ERROR= 401 +} Input_Result; /** - * @brief Queries the key status. + * @brief Queries the key state. * * @param keyState Key state. - * @return SUCCESS - Success. - * PARAMETER_ERROR - Parameter error. + * @return Returns {@link Input_Result} INPUT_SUCCESS - if the operation is successful. + * returns {@link Input_Result} INPUT_PARAMETER_ERROR - if bad parameter. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ -Input_ErrorCode OH_Input_GetKeyState(struct Input_KeyState* keyState); +Input_Result OH_Input_GetKeyState(struct Input_KeyState* keyState); /** - * @brief 创建按键状态枚举对象. + * @brief Creates a key status enumeration object. * - * @return Returns an {@link Input_KeyState} pointer object if the operation is successful + * @return Returns an {@link Input_KeyState} pointer object if the operation is successful. * returns a null pointer otherwise. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 @@ -115,62 +105,69 @@ Input_ErrorCode OH_Input_GetKeyState(struct Input_KeyState* keyState); struct Input_KeyState* OH_Input_CreateKeyState(); /** - * @brief 销毁按键状态枚举对象。 - * @param keyState 按键状态枚举对象. + * @brief Destroys a key status enumeration object. + * + * @param keyState keyState Key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ void OH_Input_DestroyKeyState(struct Input_KeyState* keyState); /** - * @brief 设置按键状态对象的键值。 - * @param keyState 按键状态枚举对象. - * @param keyCode 按键键值 + * @brief Sets the key value of a key status enumeration object. + * + * @param keyState keyState Key status enumeration object. + * @param keyCode Key value of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ void OH_Input_SetKeyCode(struct Input_KeyState* keyState, int32_t keyCode); /** - * @brief 获取按键状态对象的键值。 - * @param keyState 按键状态枚举对象. - * @return 返回按键状态对象的键值。 + * @brief Obtains the key value of a key status enumeration object. + * + * @param keyState Key status enumeration object. + * @return Key value of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ int32_t OH_Input_GetKeyCode(struct Input_KeyState* keyState); /** - * @brief 设置按键状态对象的按键是否按下。 - * @param keyState 按键状态枚举对象. - * @param keyAction 按键是否按下 + * @brief Sets whether the key specific to a key status enumeration object is pressed. + * + * @param keyState Key status enumeration object. + * @param keyAction Whether the key is pressed. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ void OH_Input_SetKeyPressed(struct Input_KeyState* keyState, int32_t keyAction); /** - * @brief 获取按键状态对象的按键是否按下。 - * @param keyState 按键状态枚举对象. - * @return 返回按键状态对象的按键按下状态。 + * @brief Checks whether the key specific to a key status enumeration object is pressed. + * + * @param keyState Key status enumeration object. + * @return Key pressing status of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ int32_t OH_Input_GetKeyPressed(struct Input_KeyState* keyState); /** - * @brief 设置按键状态对象的按键开关。 - * @param keyState 按键状态枚举对象. - * @param keySwitch 按键开关 + * @brief Sets the key switch of the key status enumeration object. + * + * @param keyState Key status enumeration object. + * @param keySwitch Key switch of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ void OH_Input_SetKeySwitch(struct Input_KeyState* keyState, int32_t keySwitch); /** - * @brief 获取按键状态对象的按键开关。 - * @param keyState 按键状态枚举对象. - * @return 返回按键状态对象的按键开关。 + * @brief Obtains the key switch of the key status enumeration object. + * + * @param keyState Key status enumeration object. + * @return Key switch of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ @@ -179,4 +176,6 @@ int32_t OH_Input_GetKeySwitch(struct Input_KeyState* keyState); #ifdef __cplusplus } #endif +/** @} */ + #endif // NATIVE_INPUT_MANAGER_H diff --git a/multimodalinput/kits/c/input/native_key_code.h b/multimodalinput/kits/c/input/native_key_code.h index c2086fe00..36459c36f 100644 --- a/multimodalinput/kits/c/input/native_key_code.h +++ b/multimodalinput/kits/c/input/native_key_code.h @@ -31,12 +31,10 @@ * @brief Defines the key event structure and related enumeration values. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @library libohinput.so + * @library libnative_input.so * @since 12 */ -#include - #ifdef __cplusplus extern "C" { #endif @@ -47,6 +45,8 @@ extern "C" { * @since 12 */ typedef enum { + /** Unknown key */ + KEYCODE_UNKNOWN = -1, /** Function (Fn) key */ KEYCODE_FN = 0, /** Volume Up key */ @@ -316,5 +316,6 @@ typedef enum { #ifdef __cplusplus } #endif +/** @} */ #endif // NATIVE_KEY_CODE_H -- Gitee From 62948b70ac8b57f8300dc59e240bb685c74e3c45 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 01:35:49 +0000 Subject: [PATCH 04/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: I3397ba37e1fb173782037b695faf19e9113b8e0f --- multimodalinput/kits/c/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimodalinput/kits/c/BUILD.gn b/multimodalinput/kits/c/BUILD.gn index fd08d9574..2be0c4547 100644 --- a/multimodalinput/kits/c/BUILD.gn +++ b/multimodalinput/kits/c/BUILD.gn @@ -24,7 +24,7 @@ ohos_ndk_headers("ohinput_header") { } ohos_ndk_library("libohinput_ndk") { - output_name = "ohinput" + output_name = "native_input" output_extension = "so" ndk_description_file = "./ohinput.ndk.json" system_capability = "SystemCapability.MultimodalInput.Input.Core" -- Gitee From 6c0188c46db419d95fb3f2ccf4ce4cbc72e7bf96 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 01:57:18 +0000 Subject: [PATCH 05/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: Ice4e07fbc312daaa292f9c26e79fddcd7fcfe973 --- multimodalinput/kits/c/input/native_input_manager.h | 6 +++--- multimodalinput/kits/c/input/native_key_code.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h index d2cde42cb..6c8ed766d 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -78,9 +78,9 @@ typedef enum { /** Permission verification failed */ INPUT_PERMISSION_DENIED = 201, /** Non-system application */ - INPUT_NOT_SYSTEM_APPLICATION= 202, + INPUT_NOT_SYSTEM_APPLICATION = 202, /** Parameter check failed */ - INPUT_PARAMETER_ERROR= 401 + INPUT_PARAMETER_ERROR = 401 } Input_Result; /** @@ -178,4 +178,4 @@ int32_t OH_Input_GetKeySwitch(struct Input_KeyState* keyState); #endif /** @} */ -#endif // NATIVE_INPUT_MANAGER_H +#endif /* NATIVE_INPUT_MANAGER_H */ diff --git a/multimodalinput/kits/c/input/native_key_code.h b/multimodalinput/kits/c/input/native_key_code.h index 36459c36f..f230e9f99 100644 --- a/multimodalinput/kits/c/input/native_key_code.h +++ b/multimodalinput/kits/c/input/native_key_code.h @@ -318,4 +318,4 @@ typedef enum { #endif /** @} */ -#endif // NATIVE_KEY_CODE_H +#endif /* NATIVE_KEY_CODE_H */ -- Gitee From 1a8cb8a4b8c66c910f0558ebf4984d7a0db273a0 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 02:53:51 +0000 Subject: [PATCH 06/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: I76a1818f4c2b168735720d0a2b2b5939a1ab0925 --- multimodalinput/kits/c/input/native_key_code.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimodalinput/kits/c/input/native_key_code.h b/multimodalinput/kits/c/input/native_key_code.h index f230e9f99..7895c2de7 100644 --- a/multimodalinput/kits/c/input/native_key_code.h +++ b/multimodalinput/kits/c/input/native_key_code.h @@ -17,7 +17,7 @@ #define NATIVE_KEY_CODE_H /** - * @addtogroup OHInput + * @addtogroup input * @{ * * @brief Provides the C interface in the multi-modal input domain. -- Gitee From acc498f47d6f35c43b43345a08735c2dd2d22352 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 02:54:53 +0000 Subject: [PATCH 07/10] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=92=8C=E6=8C=89=E9=94=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=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: I08f565f004c3922d384e8c76b1e23e494d5bce36 --- multimodalinput/kits/c/input/native_input_manager.h | 9 +++++---- multimodalinput/kits/c/ohinput.ndk.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h index 6c8ed766d..6ce958432 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -36,6 +36,7 @@ */ #include + #include "native_key_code.h" #ifdef __cplusplus @@ -51,9 +52,9 @@ enum Input_KeyStateAction { /** Default */ KEY_DEFAULT = -1, /** Pressing of a key */ - KEY_RELEASED = 0, + KEY_PRESSED = 0, /** Release of a key */ - KEY_PRESSED = 1, + KEY_RELEASED = 1, /** Key switch enabled */ KEY_SWITCH_ON = 2, /** Key switch disabled */ @@ -87,8 +88,8 @@ typedef enum { * @brief Queries the key state. * * @param keyState Key state. - * @return Returns {@link Input_Result} INPUT_SUCCESS - if the operation is successful. - * returns {@link Input_Result} INPUT_PARAMETER_ERROR - if bad parameter. + * @HTTP4O4 Returns {@Link Input_Result#INPUT_SUCCESS} if the operation is successful; + * returns an error code defined in {@Link Input_Result} otherwise. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 104153c65..137265940 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -1,5 +1,5 @@ [ - { + { "first_introduced": "12", "name": "OH_Input_GetKeyState" }, -- Gitee From bcd41211ff2a6a634cd20f47efb43dd73548cafd Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 06:10:10 +0000 Subject: [PATCH 08/10] Signed-off-by: mayunteng_1 Change-Id: I5d7daad0fc9414f0534862a6cc2df8d6fedd702c --- multimodalinput/kits/c/input/native_input_manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/native_input_manager.h index 6ce958432..a713cb4d0 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/native_input_manager.h @@ -108,7 +108,7 @@ struct Input_KeyState* OH_Input_CreateKeyState(); /** * @brief Destroys a key status enumeration object. * - * @param keyState keyState Key status enumeration object. + * @param keyState Key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 */ @@ -117,7 +117,7 @@ void OH_Input_DestroyKeyState(struct Input_KeyState* keyState); /** * @brief Sets the key value of a key status enumeration object. * - * @param keyState keyState Key status enumeration object. + * @param keyState Key status enumeration object. * @param keyCode Key value of the key status enumeration object. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 12 -- Gitee From 629a7bc1083867574e8923f0f8c2ea3d14aa6e3a Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 06:18:49 +0000 Subject: [PATCH 09/10] Signed-off-by: mayunteng_1 Change-Id: Ibfa41b0b16c8c513e8b85ddecbed0cbb418b8029 --- multimodalinput/kits/c/BUILD.gn | 6 +++--- .../kits/c/{ohinput.ndk.json => libnative_input.ndk.json} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename multimodalinput/kits/c/{ohinput.ndk.json => libnative_input.ndk.json} (100%) diff --git a/multimodalinput/kits/c/BUILD.gn b/multimodalinput/kits/c/BUILD.gn index 2be0c4547..e253153e6 100644 --- a/multimodalinput/kits/c/BUILD.gn +++ b/multimodalinput/kits/c/BUILD.gn @@ -15,7 +15,7 @@ import("//build/ohos.gni") import("//build/ohos/ndk/ndk.gni") import("//foundation/multimodalinput/input/multimodalinput_mini.gni") -ohos_ndk_headers("ohinput_header") { +ohos_ndk_headers("native_input_header") { dest_dir = "$ndk_headers_out_dir/multimodalinput" sources = [ "./input/native_input_manager.h", @@ -23,10 +23,10 @@ ohos_ndk_headers("ohinput_header") { ] } -ohos_ndk_library("libohinput_ndk") { +ohos_ndk_library("libnative_input_ndk") { output_name = "native_input" output_extension = "so" - ndk_description_file = "./ohinput.ndk.json" + ndk_description_file = "./libnative_input.ndk.json" system_capability = "SystemCapability.MultimodalInput.Input.Core" system_capability_headers = [ "multimodalinput/native_input_manager.h", diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/libnative_input.ndk.json similarity index 100% rename from multimodalinput/kits/c/ohinput.ndk.json rename to multimodalinput/kits/c/libnative_input.ndk.json -- Gitee From d6b727d8e1eea930f79cc9edf5c19b243138d56e Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Wed, 13 Mar 2024 07:01:48 +0000 Subject: [PATCH 10/10] Signed-off-by: mayunteng_1 Change-Id: Id54cda4f7171e4b552ac271e120f774f3c6ba160 Change-Id: If96b725d291d2fe1cad28ddd2c3ad583a2adc41c --- multimodalinput/kits/c/BUILD.gn | 16 ++--- ...ive_input_manager.h => oh_input_manager.h} | 12 ++-- .../{native_key_code.h => oh_key_code.h} | 62 +++++++++---------- ...native_input.ndk.json => ohinput.ndk.json} | 0 4 files changed, 45 insertions(+), 45 deletions(-) rename multimodalinput/kits/c/input/{native_input_manager.h => oh_input_manager.h} (96%) rename multimodalinput/kits/c/input/{native_key_code.h => oh_key_code.h} (90%) rename multimodalinput/kits/c/{libnative_input.ndk.json => ohinput.ndk.json} (100%) diff --git a/multimodalinput/kits/c/BUILD.gn b/multimodalinput/kits/c/BUILD.gn index e253153e6..60f919ab1 100644 --- a/multimodalinput/kits/c/BUILD.gn +++ b/multimodalinput/kits/c/BUILD.gn @@ -15,21 +15,21 @@ import("//build/ohos.gni") import("//build/ohos/ndk/ndk.gni") import("//foundation/multimodalinput/input/multimodalinput_mini.gni") -ohos_ndk_headers("native_input_header") { +ohos_ndk_headers("ohinput_header") { dest_dir = "$ndk_headers_out_dir/multimodalinput" sources = [ - "./input/native_input_manager.h", - "./input/native_key_code.h", + "./input/oh_input_manager.h", + "./input/oh_key_code.h", ] } -ohos_ndk_library("libnative_input_ndk") { - output_name = "native_input" +ohos_ndk_library("libohinput_ndk") { + output_name = "ohinput" output_extension = "so" - ndk_description_file = "./libnative_input.ndk.json" + ndk_description_file = "./ohinput.ndk.json" system_capability = "SystemCapability.MultimodalInput.Input.Core" system_capability_headers = [ - "multimodalinput/native_input_manager.h", - "multimodalinput/native_key_code.h", + "multimodalinput/oh_input_manager.h", + "multimodalinput/oh_key_code.h", ] } diff --git a/multimodalinput/kits/c/input/native_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h similarity index 96% rename from multimodalinput/kits/c/input/native_input_manager.h rename to multimodalinput/kits/c/input/oh_input_manager.h index a713cb4d0..7d02e48a1 100644 --- a/multimodalinput/kits/c/input/native_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef NATIVE_INPUT_MANAGER_H -#define NATIVE_INPUT_MANAGER_H +#ifndef OH_INPUT_MANAGER_H +#define OH_INPUT_MANAGER_H /** * @addtogroup input @@ -26,18 +26,18 @@ */ /** - * @file native_input_manager.h + * @file oh_input_manager.h * * @brief Provides capabilities such as event injection and key status query. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @library libnative_input.so + * @library liboh_input.so * @since 12 */ #include -#include "native_key_code.h" +#include "oh_key_code.h" #ifdef __cplusplus extern "C" { @@ -179,4 +179,4 @@ int32_t OH_Input_GetKeySwitch(struct Input_KeyState* keyState); #endif /** @} */ -#endif /* NATIVE_INPUT_MANAGER_H */ +#endif /* OH_INPUT_MANAGER_H */ diff --git a/multimodalinput/kits/c/input/native_key_code.h b/multimodalinput/kits/c/input/oh_key_code.h similarity index 90% rename from multimodalinput/kits/c/input/native_key_code.h rename to multimodalinput/kits/c/input/oh_key_code.h index 7895c2de7..ca523bbf0 100644 --- a/multimodalinput/kits/c/input/native_key_code.h +++ b/multimodalinput/kits/c/input/oh_key_code.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef NATIVE_KEY_CODE_H -#define NATIVE_KEY_CODE_H +#ifndef OH_KEY_CODE_H +#define OH_KEY_CODE_H /** * @addtogroup input @@ -26,12 +26,12 @@ */ /** - * @file native_key_code.h + * @file oh_key_code.h * * @brief Defines the key event structure and related enumeration values. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @library libnative_input.so + * @library libohinput.so * @since 12 */ @@ -85,9 +85,9 @@ typedef enum { KEYCODE_8 = 2008, /** Key 9 */ KEYCODE_9 = 2009, - /** Key * */ + /** Key * */ KEYCODE_STAR = 2010, - /** Key # */ + /** Key # */ KEYCODE_POUND = 2011, /** Up key on D-pad */ KEYCODE_DPAD_UP = 2012, @@ -151,53 +151,53 @@ typedef enum { KEYCODE_Y = 2041, /** Key Z */ KEYCODE_Z = 2042, - /** Key , */ + /** Key , */ KEYCODE_COMMA = 2043, - /** Key . */ + /** Key . */ KEYCODE_PERIOD = 2044, - /** Left Alt key */ + /** Left Alt key */ KEYCODE_ALT_LEFT = 2045, - /** Right Alt key */ + /** Right Alt key */ KEYCODE_ALT_RIGHT = 2046, - /** Left Shift key */ + /** Left Shift key */ KEYCODE_SHIFT_LEFT = 2047, - /** Right Shift key */ + /** Right Shift key */ KEYCODE_SHIFT_RIGHT = 2048, - /** Tab key */ + /** Tab key */ KEYCODE_TAB = 2049, - /** Space key */ + /** Space key */ KEYCODE_SPACE = 2050, - /** Symbol key */ + /** Symbol key */ KEYCODE_SYM = 2051, - /** Explorer key, used to start the explorer application */ + /** Explorer key, used to start the explorer application */ KEYCODE_EXPLORER = 2052, - /** Email key, used to start the email application */ + /** Email key, used to start the email application */ KEYCODE_ENVELOPE = 2053, - /** Enter key */ + /** Enter key */ KEYCODE_ENTER = 2054, - /** Backspace key */ + /** Backspace key */ KEYCODE_DEL = 2055, - /** Key * */ + /** Key * */ KEYCODE_GRAVE = 2056, - /** Key - */ + /** Key - */ KEYCODE_MINUS = 2057, - /** Key = */ + /** Key = */ KEYCODE_EQUALS = 2058, - /** Key [ */ + /** Key [ */ KEYCODE_LEFT_BRACKET = 2059, - /** Key ] */ + /** Key ] */ KEYCODE_RIGHT_BRACKET = 2060, - /** Key \ */ + /** Key \ */ KEYCODE_BACKSLASH = 2061, - /** Key ; */ + /** Key ; */ KEYCODE_SEMICOLON = 2062, - /** Key ' */ + /** Key ' */ KEYCODE_APOSTROPHE = 2063, - /** Key / */ + /** Key / */ KEYCODE_SLASH = 2064, - /** Key @ */ + /** Key @ */ KEYCODE_AT = 2065, - /** Key + */ + /** Key + */ KEYCODE_PLUS = 2066, /** Menu key */ KEYCODE_MENU = 2067, @@ -318,4 +318,4 @@ typedef enum { #endif /** @} */ -#endif /* NATIVE_KEY_CODE_H */ +#endif /* OH_KEY_CODE_H */ diff --git a/multimodalinput/kits/c/libnative_input.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json similarity index 100% rename from multimodalinput/kits/c/libnative_input.ndk.json rename to multimodalinput/kits/c/ohinput.ndk.json -- Gitee