Skip to content

Conversation

mtjhrc
Copy link
Collaborator

@mtjhrc mtjhrc commented Sep 24, 2025

This PR adds a generic virtio-input device, that can be used either by specifying a callbacks for configuring the device and generating input events, or by forwarding a /dev/input/event*.

This also hooks up the functionality for gui_vm example (keyboard and touchscreen).

@mtjhrc mtjhrc force-pushed the input-and-touch branch 10 times, most recently from febeffb to 9b74ac8 Compare September 30, 2025 13:47
mtjhrc and others added 6 commits October 1, 2025 12:30
We were using VecDeque::pop instead of ::pop_front like inteded, oops.

Signed-off-by: Matej Hrica <[email protected]>
Previously we only provided RawFd.

Signed-off-by: Matej Hrica <[email protected]>
The device can be configured using 2 vtables one providing the callbacks
for querying configuration parameters of the device and other vtable for delivering
the actual input events.

Signed-off-by: Matej Hrica <[email protected]>
Introduce krun_add_input_device_fd, allowing the user to pass a file descriptor to
a /dev/input/event* device, which will be become available in the guest.

Signed-off-by: Matej Hrica <[email protected]>
The send_many method is more convinient, should be more efficient and
can also be more robust - all of the messages are sent atomically.

Signed-off-by: Matej Hrica <[email protected]>
@mtjhrc mtjhrc force-pushed the input-and-touch branch 4 times, most recently from 6be8b3e to a35dad4 Compare October 7, 2025 10:10
@mtjhrc mtjhrc marked this pull request as ready for review October 7, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant