Module input_manager

Source
Available on crate feature api-12 only.
Expand description

Provides functions such as event injection and status query.

System capability: SystemCapability.MultimodalInput.Input.Core

Structs§

InputErrorCode
Enumerates error codes.
InputEvent_MouseAxis
Mouse axis types.
InputEvent_SourceType
Enumerates event source types.
Input_AxisEvent
Enumerates axis events.
Input_DeviceInfoapi-13
Represents information about the input device.
Input_DeviceListenerapi-13
Defines a listener for device insertion and removal events.
Input_Hotkeyapi-14
Defines the hot key structure.
Input_InterceptorEventCallback
Defines the structure for the interceptor of event callbacks, including mouseCallback, touchCallback, and axisCallback.
Input_InterceptorOptions
Defines event interceptor options.
Input_KeyEvent
The key event to be injected.
Input_KeyEventAction
Enumerates key event types.
Input_KeyState
Defines key information, which identifies a key pressing behavior. For example, the Ctrl key information contains the key value and key type.
Input_KeyStateAction
Enumerated values of key event action.
Input_KeyboardTypeapi-13
Enumerates keyboard types.
Input_MouseEvent
The mouse event to be injected.
Input_MouseEventAction
Enumerated values of mouse event action.
Input_MouseEventButton
Enumerated values of mouse event button.
Input_TouchEvent
The touch event to be injected.
Input_TouchEventAction
Enumerated values of touch event action.

Functions§

OH_Input_AddAxisEventMonitor
Adds a listener for the specified type of axis events.
OH_Input_AddAxisEventMonitorForAll
Adds a listener for all types of axis events. The axis event types are defined in InputEvent_AxisEventType.
OH_Input_AddHotkeyMonitorapi-14
Subscribes to shortcut key events.
OH_Input_AddInputEventInterceptor
Adds an interceptor for input events, including mouse, touch, and axis events. If multiple interceptors are added, only the first one takes effect.
OH_Input_AddKeyEventInterceptor
Adds a key event interceptor. If multiple interceptors are added, only the first one takes effect.
OH_Input_AddKeyEventMonitor
Adds a listener of key events.
OH_Input_AddMouseEventMonitor
Adds a listener for mouse events, including mouse click and movement events, but not scroll wheel events. Scroll wheel events are axis events.
OH_Input_AddTouchEventMonitor
Add a listener for touch events.
OH_Input_CancelInjection
Cancels event injection and revokes authorization.
OH_Input_CreateAllSystemHotkeysapi-14
Creates an array of Input_Hotkey instances.
OH_Input_CreateAxisEvent
Creates an axis event object.
OH_Input_CreateDeviceInfoapi-13
Creates a deviceInfo object.
OH_Input_CreateHotkeyapi-14
Creates a hot key object.
OH_Input_CreateKeyEvent
Creates a key event object.
OH_Input_CreateKeyState
Creates a key status enumeration object.
OH_Input_CreateMouseEvent
Creates a mouse event object.
OH_Input_CreateTouchEvent
Creates a touch event object.
OH_Input_DestroyAllSystemHotkeysapi-14
Destroys an array of Input_Hotkey instances and reclaims memory.
OH_Input_DestroyAxisEvent
Destroys an axis event object.
OH_Input_DestroyDeviceInfoapi-13
Destroys a deviceInfo object.
OH_Input_DestroyHotkeyapi-14
Destroys a hot key object.
OH_Input_DestroyKeyEvent
Destroys a key event object.
OH_Input_DestroyKeyState
Destroys a key status enumeration object.
OH_Input_DestroyMouseEvent
Destroys a mouse event object.
OH_Input_DestroyTouchEvent
Destroys a touch event object.
OH_Input_GetAllSystemHotkeysapi-14
Obtains all hot keys supported by the system.
OH_Input_GetAxisEventAction
Obtains the axis event action.
OH_Input_GetAxisEventActionTime
Obtains the time when an axis event occurs.
OH_Input_GetAxisEventAxisValue
Obtains the axis value for the specified axis type of the axis event.
OH_Input_GetAxisEventDisplayX
Obtains the X coordinate of an axis event.
OH_Input_GetAxisEventDisplayY
Obtains the Y coordinate of an axis event.
OH_Input_GetAxisEventSourceType
Obtains the axis event source type.
OH_Input_GetAxisEventType
Obtains the axis event type.
OH_Input_GetCapabilitiesapi-13
Obtains the capabilities of an input device, for example, a touchscreen, touchpad, or keyboard.
OH_Input_GetDeviceapi-13
Obtains the information about an input device.
OH_Input_GetDeviceAddressapi-13
Obtains the physical address of an input device.
OH_Input_GetDeviceIdapi-13
Obtains the ID of an input device.
OH_Input_GetDeviceIdsapi-13
Obtains the IDs of all input devices.
OH_Input_GetDeviceNameapi-13
Obtains the name of an input device.
OH_Input_GetDeviceProductapi-13
Obtains the product information of an input device.
OH_Input_GetDeviceVendorapi-13
Obtains the vendor information of an input device.
OH_Input_GetDeviceVersionapi-13
Obtains the version information of an input device.
OH_Input_GetFinalKeyapi-14
Obtains a modified key.
OH_Input_GetIntervalSinceLastInputapi-14
Obtains the interval since the last system input event.
OH_Input_GetKeyCode
Obtains the key value of a key status enumeration object.
OH_Input_GetKeyEventAction
Obtains the key event type.
OH_Input_GetKeyEventActionTime
Obtains the time when a key event occurs.
OH_Input_GetKeyEventKeyCode
Obtains the key value of a key event.
OH_Input_GetKeyPressed
Checks whether the key specific to a key status enumeration object is pressed.
OH_Input_GetKeyState
Queries the key state.
OH_Input_GetKeySwitch
Obtains the key switch of the key status enumeration object.
OH_Input_GetKeyboardTypeapi-13
Obtains the keyboard type of an input device.
OH_Input_GetMouseEventAction
Obtains the action of a mouse event.
OH_Input_GetMouseEventActionTime
Obtains the time when a mouse event occurs.
OH_Input_GetMouseEventAxisType
Obtains the axis type of a mouse event.
OH_Input_GetMouseEventAxisValue
Obtains the axis value of a mouse event.
OH_Input_GetMouseEventButton
Obtains the button of a mouse event.
OH_Input_GetMouseEventDisplayX
Obtains the X coordinate of a mouse event.
OH_Input_GetMouseEventDisplayY
Obtains the Y coordinate of a mouse event.
OH_Input_GetPreKeysapi-14
Obtains a modifier key.
OH_Input_GetRepeatapi-14
Checks whether to report repeated key events.
OH_Input_GetTouchEventAction
Obtains the action of a touch event.
OH_Input_GetTouchEventActionTime
Obtains the time when a touch event occurs.
OH_Input_GetTouchEventDisplayX
Obtains the X coordinate of a touch event.
OH_Input_GetTouchEventDisplayY
Obtains the Y coordinate of a touch event.
OH_Input_GetTouchEventFingerId
Obtains the finger ID of a touch event.
OH_Input_InjectKeyEvent
Inject system keys.
OH_Input_InjectMouseEvent
Inject mouse event.
OH_Input_InjectTouchEvent
Inject touch event.
OH_Input_RegisterDeviceListenerapi-13
Registers a listener for device hot swap events.
OH_Input_RemoveAxisEventMonitor
Removes the listener for the specified type of axis events.
OH_Input_RemoveAxisEventMonitorForAll
Removes the listener for all types of axis events.
OH_Input_RemoveHotkeyMonitorapi-14
Unsubscribes from shortcut key events.
OH_Input_RemoveInputEventInterceptor
Removes an interceptor for input events, including mouse, touch, and axis events.
OH_Input_RemoveKeyEventInterceptor
Removes a key event interceptor.
OH_Input_RemoveKeyEventMonitor
Removes a key event listener.
OH_Input_RemoveMouseEventMonitor
Removes a mouse event listener.
OH_Input_RemoveTouchEventMonitor
Removes a touch event listener.
OH_Input_SetAxisEventAction
Sets the axis event action.
OH_Input_SetAxisEventActionTime
Sets the time when an axis event occurs.
OH_Input_SetAxisEventAxisValue
Sets the axis value of the axis type specified by the axis event.
OH_Input_SetAxisEventDisplayX
Sets the X coordinate of an axis event.
OH_Input_SetAxisEventDisplayY
Sets the Y coordinate of an axis event.
OH_Input_SetAxisEventSourceType
Sets the axis event source type.
OH_Input_SetAxisEventType
Sets the axis event type.
OH_Input_SetFinalKeyapi-14
Sets a modified key.
OH_Input_SetKeyCode
Sets the key value of a key status enumeration object.
OH_Input_SetKeyEventAction
Sets the key event type.
OH_Input_SetKeyEventActionTime
Sets the time when a key event occurs.
OH_Input_SetKeyEventKeyCode
Sets the key value for a key event.
OH_Input_SetKeyPressed
Sets whether the key specific to a key status enumeration object is pressed.
OH_Input_SetKeySwitch
Sets the key switch of the key status enumeration object.
OH_Input_SetMouseEventAction
Sets the action for a mouse event.
OH_Input_SetMouseEventActionTime
Sets the time when a mouse event occurs.
OH_Input_SetMouseEventAxisType
Sets the axis type for mouse event.
OH_Input_SetMouseEventAxisValue
Sets the axis value for a mouse axis event.
OH_Input_SetMouseEventButton
Sets the button for a mouse event.
OH_Input_SetMouseEventDisplayX
Sets the X coordinate for a mouse event.
OH_Input_SetMouseEventDisplayY
Sets the Y coordinate for a mouse event.
OH_Input_SetPreKeysapi-14
Sets a modifier key.
OH_Input_SetRepeatapi-14
Specifies whether to report repeated key events.
OH_Input_SetTouchEventAction
Sets the action for a touch event.
OH_Input_SetTouchEventActionTime
Sets the time when a touch event occurs.
OH_Input_SetTouchEventDisplayX
Sets the X coordinate for a touch event.
OH_Input_SetTouchEventDisplayY
Sets the Y coordinate for a touch event.
OH_Input_SetTouchEventFingerId
Sets the finger ID for the touch event.
OH_Input_UnregisterDeviceListenerapi-13
Unregisters the listener for device hot swap events.
OH_Input_UnregisterDeviceListenersapi-13
Unregisters the listener for all device hot swap events.

Type Aliases§

Input_AxisEventCallback
Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.
Input_DeviceAddedCallbackapi-13
Defines the callback for device addition events.
Input_DeviceRemovedCallbackapi-13
Defines the callback for device removal events.
Input_HotkeyCallbackapi-14
Callback used to return shortcut key events.
Input_KeyEventCallback
Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.
Input_MouseEventCallback
Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.
Input_Result
Input_TouchEventCallback
Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.