OH_Input_RemoveKeyEventHook

Function OH_Input_RemoveKeyEventHook 

Source
pub unsafe extern "C" fn OH_Input_RemoveKeyEventHook(
    callback: Input_KeyEventCallback,
) -> Input_Result
Available on crate feature api-21 only.
Expand description

Remove keyEvent interception hook function.

§Arguments

  • callback - - Hook function, Same as the parameters when calling OH_Input_AddKeyEventHook.

§Returns

  • OH_Input_RemoveKeyEventHook function result code. [INPUT_SUCCESS] Hook function removed successfully.

Even if the hook function has not been added before, it will return success when removed.

[INPUT_PARAMETER_ERROR] Failed to remove the hook function. Reason: Parameter check failed.

[INPUT_SERVICE_EXCEPTION] Failed to remove the hook function.

Reason: Input service exception, please try again.

Available since API-level: 21