Hi everyone,
For my current project, I need to create a virtual input to emulate a mouse.
I have a custom C program that currently take control of an existing /dev/input/eventX
mouse input and send custom input_event messages. This works well.
And now i’m trying to do the same but on a virtual input device using uinput
.
It looks like uinput
is not loaded when i do lsmod
although i saw that uinput could be built into the kernel and not be considered as a module so this could be the reason.
So because of that i can’t do modprobe uinput
to activate uinput.
I tried to create it manually using mknod /dev/uinput c 10 223
and (tried also on /dev/input/uinput
) and then set the permission to 666 but in all cases, when i try to create / access uinput from my C program, i’m getting errors such as No such device
or Bad file descriptor
depending on the method used (I tried with both libevdev and the lower-level uinput interface).
Is uinput
built into the kernel or do i need to somehow activate it?
Does anyone know if what i’m trying to is feasible on a nerves-based device?
Is there maybe another way to create a virtual mouse device?