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§
- Input
Event_ Mouse Axis - Mouse axis types.
- Input
Event_ Source Type - Enumerates event source types.
- Input_
Axis Event - Input_
Device Info - Input_
Device Listener api-13 - Defines a listener for device insertion and removal events.
- Input_
Hotkey - Input_
Interceptor Event Callback - Defines the structure for the interceptor of event callbacks, including mouseCallback, touchCallback, and axisCallback.
- Input_
Interceptor Options - Input_
KeyEvent - Input_
KeyEvent Action - Enumerates key event types.
- Input_
KeyState - Input_
KeyState Action - Enumerated values of key event action.
- Input_
Keyboard Type api-13 - Enumerates keyboard types.
- Input_
Mouse Event - Input_
Mouse Event Action - Enumerated values of mouse event action.
- Input_
Mouse Event Button - Enumerated values of mouse event button.
- Input_
Result - Enumerates error codes.
- Input_
Touch Event - Input_
Touch Event Action - Enumerated values of touch event action.
Functions§
- OH_
Input_ ⚠AddAxis Event Monitor - Adds a listener for the specified type of axis events.
- OH_
Input_ ⚠AddAxis Event Monitor ForAll - Adds a listener for all types of axis events.
The axis event types are defined in
InputEvent_AxisEventType. - OH_
Input_ ⚠AddHotkey Monitor api-14 - Subscribes to shortcut key events.
- OH_
Input_ ⚠AddInput Event Interceptor - 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_ ⚠AddKey Event Interceptor - Adds a key event interceptor. If multiple interceptors are added, only the first one takes effect.
- OH_
Input_ ⚠AddKey Event Monitor - Adds a listener of key events.
- OH_
Input_ ⚠AddMouse Event Monitor - 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_ ⚠AddTouch Event Monitor - Add a listener for touch events.
- OH_
Input_ ⚠Cancel Injection - Cancels event injection and revokes authorization.
- OH_
Input_ ⚠Create AllSystem Hotkeys api-14 - Creates an array of
Input_Hotkeyinstances. - OH_
Input_ ⚠Create Axis Event - Creates an axis event object.
- OH_
Input_ ⚠Create Device Info api-13 - Creates a deviceInfo object.
- OH_
Input_ ⚠Create Hotkey api-14 - Creates a hot key object.
- OH_
Input_ ⚠Create KeyEvent - Creates a key event object.
- OH_
Input_ ⚠Create KeyState - Creates a key status enumeration object.
- OH_
Input_ ⚠Create Mouse Event - Creates a mouse event object.
- OH_
Input_ ⚠Create Touch Event - Creates a touch event object.
- OH_
Input_ ⚠Destroy AllSystem Hotkeys api-14 - Destroys an array of
Input_Hotkeyinstances and reclaims memory. - OH_
Input_ ⚠Destroy Axis Event - Destroys an axis event object.
- OH_
Input_ ⚠Destroy Device Info api-13 - Destroys a deviceInfo object.
- OH_
Input_ ⚠Destroy Hotkey api-14 - Destroys a hot key object.
- OH_
Input_ ⚠Destroy KeyEvent - Destroys a key event object.
- OH_
Input_ ⚠Destroy KeyState - Destroys a key status enumeration object.
- OH_
Input_ ⚠Destroy Mouse Event - Destroys a mouse event object.
- OH_
Input_ ⚠Destroy Touch Event - Destroys a touch event object.
- OH_
Input_ ⚠GetAll System Hotkeys api-14 - Obtains all hot keys supported by the system.
- OH_
Input_ ⚠GetAxis Event Action - Obtains the axis event action.
- OH_
Input_ ⚠GetAxis Event Action Time - Obtains the time when an axis event occurs.
- OH_
Input_ ⚠GetAxis Event Axis Value - Obtains the axis value for the specified axis type of the axis event.
- OH_
Input_ ⚠GetAxis Event DisplayX - Obtains the X coordinate of an axis event.
- OH_
Input_ ⚠GetAxis Event DisplayY - Obtains the Y coordinate of an axis event.
- OH_
Input_ ⚠GetAxis Event Source Type - Obtains the axis event source type.
- OH_
Input_ ⚠GetAxis Event Type - Obtains the axis event type.
- OH_
Input_ ⚠GetCapabilities api-13 - Obtains the capabilities of an input device, for example, a touchscreen, touchpad, or keyboard.
- OH_
Input_ ⚠GetDevice api-13 - Obtains the information about an input device.
- OH_
Input_ ⚠GetDevice Address api-13 - Obtains the physical address of an input device.
- OH_
Input_ ⚠GetDevice Id api-13 - Obtains the ID of an input device.
- OH_
Input_ ⚠GetDevice Ids api-13 - Obtains the IDs of all input devices.
- OH_
Input_ ⚠GetDevice Name api-13 - Obtains the name of an input device.
- OH_
Input_ ⚠GetDevice Product api-13 - Obtains the product information of an input device.
- OH_
Input_ ⚠GetDevice Vendor api-13 - Obtains the vendor information of an input device.
- OH_
Input_ ⚠GetDevice Version api-13 - Obtains the version information of an input device.
- OH_
Input_ ⚠GetFinal Key api-14 - Obtains a modified key.
- OH_
Input_ ⚠GetInterval Since Last Input api-14 - Obtains the interval since the last system input event.
- OH_
Input_ ⚠GetKey Code - Obtains the key value of a key status enumeration object.
- OH_
Input_ ⚠GetKey Event Action - Obtains the key event type.
- OH_
Input_ ⚠GetKey Event Action Time - Obtains the time when a key event occurs.
- OH_
Input_ ⚠GetKey Event KeyCode - Obtains the key value of a key event.
- OH_
Input_ ⚠GetKey Pressed - Checks whether the key specific to a key status enumeration object is pressed.
- OH_
Input_ ⚠GetKey State - Queries the key state.
- OH_
Input_ ⚠GetKey Switch - Obtains the key switch of the key status enumeration object.
- OH_
Input_ ⚠GetKeyboard Type api-13 - Obtains the keyboard type of an input device.
- OH_
Input_ ⚠GetMouse Event Action - Obtains the action of a mouse event.
- OH_
Input_ ⚠GetMouse Event Action Time - Obtains the time when a mouse event occurs.
- OH_
Input_ ⚠GetMouse Event Axis Type - Obtains the axis type of a mouse event.
- OH_
Input_ ⚠GetMouse Event Axis Value - Obtains the axis value of a mouse event.
- OH_
Input_ ⚠GetMouse Event Button - Obtains the button of a mouse event.
- OH_
Input_ ⚠GetMouse Event DisplayX - Obtains the X coordinate of a mouse event.
- OH_
Input_ ⚠GetMouse Event DisplayY - Obtains the Y coordinate of a mouse event.
- OH_
Input_ ⚠GetPre Keys api-14 - Obtains a modifier key.
- OH_
Input_ ⚠GetRepeat api-14 - Checks whether to report repeated key events.
- OH_
Input_ ⚠GetTouch Event Action - Obtains the action of a touch event.
- OH_
Input_ ⚠GetTouch Event Action Time - Obtains the time when a touch event occurs.
- OH_
Input_ ⚠GetTouch Event DisplayX - Obtains the X coordinate of a touch event.
- OH_
Input_ ⚠GetTouch Event DisplayY - Obtains the Y coordinate of a touch event.
- OH_
Input_ ⚠GetTouch Event Finger Id - Obtains the finger ID of a touch event.
- OH_
Input_ ⚠Inject KeyEvent - Inject system keys.
- OH_
Input_ ⚠Inject Mouse Event - Inject mouse event.
- OH_
Input_ ⚠Inject Touch Event - Inject touch event.
- OH_
Input_ ⚠Register Device Listener api-13 - Registers a listener for device hot swap events.
- OH_
Input_ ⚠Remove Axis Event Monitor - Removes the listener for the specified type of axis events.
- OH_
Input_ ⚠Remove Axis Event Monitor ForAll - Removes the listener for all types of axis events.
- OH_
Input_ ⚠Remove Hotkey Monitor api-14 - Unsubscribes from shortcut key events.
- OH_
Input_ ⚠Remove Input Event Interceptor - Removes an interceptor for input events, including mouse, touch, and axis events.
- OH_
Input_ ⚠Remove KeyEvent Interceptor - Removes a key event interceptor.
- OH_
Input_ ⚠Remove KeyEvent Monitor - Removes a key event listener.
- OH_
Input_ ⚠Remove Mouse Event Monitor - Removes a mouse event listener.
- OH_
Input_ ⚠Remove Touch Event Monitor - Removes a touch event listener.
- OH_
Input_ ⚠SetAxis Event Action - Sets the axis event action.
- OH_
Input_ ⚠SetAxis Event Action Time - Sets the time when an axis event occurs.
- OH_
Input_ ⚠SetAxis Event Axis Value - Sets the axis value of the axis type specified by the axis event.
- OH_
Input_ ⚠SetAxis Event DisplayX - Sets the X coordinate of an axis event.
- OH_
Input_ ⚠SetAxis Event DisplayY - Sets the Y coordinate of an axis event.
- OH_
Input_ ⚠SetAxis Event Source Type - Sets the axis event source type.
- OH_
Input_ ⚠SetAxis Event Type - Sets the axis event type.
- OH_
Input_ ⚠SetFinal Key api-14 - Sets a modified key.
- OH_
Input_ ⚠SetKey Code - Sets the key value of a key status enumeration object.
- OH_
Input_ ⚠SetKey Event Action - Sets the key event type.
- OH_
Input_ ⚠SetKey Event Action Time - Sets the time when a key event occurs.
- OH_
Input_ ⚠SetKey Event KeyCode - Sets the key value for a key event.
- OH_
Input_ ⚠SetKey Pressed - Sets whether the key specific to a key status enumeration object is pressed.
- OH_
Input_ ⚠SetKey Switch - Sets the key switch of the key status enumeration object.
- OH_
Input_ ⚠SetMouse Event Action - Sets the action for a mouse event.
- OH_
Input_ ⚠SetMouse Event Action Time - Sets the time when a mouse event occurs.
- OH_
Input_ ⚠SetMouse Event Axis Type - Sets the axis type for mouse event.
- OH_
Input_ ⚠SetMouse Event Axis Value - Sets the axis value for a mouse axis event.
- OH_
Input_ ⚠SetMouse Event Button - Sets the button for a mouse event.
- OH_
Input_ ⚠SetMouse Event DisplayX - Sets the X coordinate for a mouse event.
- OH_
Input_ ⚠SetMouse Event DisplayY - Sets the Y coordinate for a mouse event.
- OH_
Input_ ⚠SetPre Keys api-14 - Sets a modifier key.
- OH_
Input_ ⚠SetRepeat api-14 - Specifies whether to report repeated key events.
- OH_
Input_ ⚠SetTouch Event Action - Sets the action for a touch event.
- OH_
Input_ ⚠SetTouch Event Action Time - Sets the time when a touch event occurs.
- OH_
Input_ ⚠SetTouch Event DisplayX - Sets the X coordinate for a touch event.
- OH_
Input_ ⚠SetTouch Event DisplayY - Sets the Y coordinate for a touch event.
- OH_
Input_ ⚠SetTouch Event Finger Id - Sets the finger ID for the touch event.
- OH_
Input_ ⚠Unregister Device Listener api-13 - Unregisters the listener for device hot swap events.
- OH_
Input_ ⚠Unregister Device Listeners api-13 - Unregisters the listener for all device hot swap events.
Type Aliases§
- Input_
Axis Event Callback - Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.
- Input_
Device Added Callback api-13 - Defines the callback for device addition events.
- Input_
Device Removed Callback api-13 - Defines the callback for device removal events.
- Input_
Hotkey Callback api-14 - Callback used to return shortcut key events.
- Input_
KeyEvent Callback - Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.
- Input_
Mouse Event Callback - Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.
- Input_
Touch Event Callback - Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.