diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h index a20f0e9b5f75e9ca329d42efdf748b49375ab77b..9a484083507cbeede2971c21a42100a4285b6473 100644 --- a/arkui/ace_engine/native/native_key_event.h +++ b/arkui/ace_engine/native/native_key_event.h @@ -500,6 +500,42 @@ ArkUI_KeyEventType OH_ArkUI_KeyEvent_GetType(const ArkUI_UIInputEvent* event); */ int32_t OH_ArkUI_KeyEvent_GetKeyCode(const ArkUI_UIInputEvent* event); +/** + * @brief Get the Num Lock state of the key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param state Return whether the Num Lock is on. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 18 + */ +ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsNumLockOn(const ArkUI_UIInputEvent* event, bool* state); + +/** + * @brief Get the Caps Lock state of the key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param state Return whether the Caps Lock is on. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 18 + */ +ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsCapsLockOn(const ArkUI_UIInputEvent* event, bool* state); + +/** + * @brief Get the Scroll Lock state of the key event. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @param state Return whether the Scroll Lock is on. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 18 + */ +ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsScrollLockOn(const ArkUI_UIInputEvent* event, bool* state); + /** * @brief Obtains the key value from a key event. *