pub unsafe extern "C" fn OH_Input_DispatchToNextHandler(
eventId: i32,
) -> Input_Resultapi-21 only.Expand description
Redispatches keyEvent. Only keyEvent intercepted by hook functions can be redispatched, and the event order must be maintained during redispatching. The hook function intercepts the input event and then redistributes it for 3 seconds. If this time is exceeded, calling this function will return INPUT_PARAMETER_ERROR. Re-dispatching requires event pairing, usually starting with one or more KEY_ACTION_DOWN and ending with KEY_ACTION_UP or KEY_ACTION_CANCEL. Only KEY_ACTION_UP or KEY_ACTION_CANCEL is redispatched, the function call succeeds, but no actual dispatch is made. If an event is dispatched that is not intercepted by the hook function, the function call succeeds, but no actual dispatch action is taken.
§Arguments
eventId- - keyEvent eventId.
§Returns
- OH_Input_DispatchToNextHandler function result code.
[
INPUT_SUCCESS] Redistribution successful.
[INPUT_PARAMETER_ERROR] Redistribution failed. Reason: KeyEvent does not exist.
[INPUT_SERVICE_EXCEPTION] Redistribution failed.
Reason: Input service exception, it’s recommended to reset the pending distribution status.
Available since API-level: 21