OH_NativeXComponent_GetKeyEventModifierKeyStates

Function OH_NativeXComponent_GetKeyEventModifierKeyStates 

Source
pub unsafe extern "C" fn OH_NativeXComponent_GetKeyEventModifierKeyStates(
    keyEvent: *mut OH_NativeXComponent_KeyEvent,
    keys: *mut u64,
) -> i32
Available on crate feature api-20 only.
Expand description

Obtains the state of the modifier keys of the key event.

§Arguments

  • keyEvent - Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.

  • keys - Pointer to a variable where the current combination of pressed modifier keys will be returned. The application can use bitwise operations to determine the state of each modifier key. Modifier keys can be referred to [ArkUI_ModifierKeyName].

§Returns

  • Returns the result code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 20

Version: 1.0