| Updated: October 28, 2024 |
Create an interface for input devices
vdev virtio-input [display display_id]
[force_dev_presence enabled]
[global_alpha number]
[loc addr intr guest_intr]
[offset x_offset,y_offset]
[options [+|-]bitmask]
[pipeline number]
[protocol b]
[sched priority]
[size x_dimension,y_dimension]
[window window_id]
[zorder zorder]
screen input_type
This option is ignored if window is defined, because an external window is used in this case. If you don't provide display or window, by default, an internal window on the default display is created.
The guest_intr argument consists of two colon-separated components:
For example: gic:43
For more information on setting guest interrupts, see the section on Configuring guests in the QNX Hypervisor User's Guide.
If you include this option, the vdev presents itself to the guest as a memory-mapped I/O (MMIO) device at the location specified by addr. Otherwise, the vdev presents itself as a PCI device.
You must use this option with the intr option.
Adjust the x and y coordinates of all events by x_offset and y_offset, respectively. Both arguments are specified in pixels.
The guest will see the events at the adjusted coordinates (x+x_offset, y+y_offset).
In most cases, you don't need to use this option. It can be useful, however, if the display coordinates of the guest's window are offset from those of the hardware display.
By default, options is set to 0x12. The rest of the bits are set according to the device. For instance, if the virtio-input vdev presents itself as a mouse (see the screen option), it sets the VI_DEV_POINTER_AS_MOUSE bit when it receives a SCREEN_EVENT_POINTER event.
In most cases, you don't need to use the options option.
| Option | Bitmask |
|---|---|
| VI_DEV_EVSYN_MULTIPLE | 0x0001 |
| VI_DEV_EVSYN_ALWAYS | 0x0002 |
| VI_DEV_POINTER_AS_MOUSE | 0x0004 |
| VI_DEV_POINTER_HAS_WHEEL | 0x0008 |
| VI_DEV_0FILL (where 0 is zero) | 0x0010 |
| VI_DEV_TOUCH_ST | 0x0020 |
| VI_DEV_TOUCH_MT | 0x0040 |
| VI_DEV_SENSITIVITY_CONTINUE | 0x0080 |
| VI_DEV_ALL_OPTIONS | 0x00ff |
Change the protocol from type A to type B. The default protocol is type A.
This option makes the vdev use the part of the multi-touch (MT) protocol that supports type B devices, which are those devices capable of tracking identifiable contacts. In this case, the protocol describes how to send updates for individual contacts via event slots. For more information, see https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt.
In most cases, you can omit this option.
Set the device input type. This option is required.
screen touch screen multi-touch
This option is ignored if window is defined, because an external window is used in this case.
(ARM and x86) The input vdev creates an interface for input devices. It supports USB keyboards, USB mice, and touch input devices.
Normally, the vdev appears as a PCI device on x86. But if you specify the loc and intr options, the guest will see the vdev as a memory-mapped I/O (MMIO) device at the location specified by loc.
You can specify up to three input devs in a VM configuration, where each vdev presents itself as a different device to the guest. See Configuration examples for more information.