As far as I know, in Linux, inputs from hardware devices can be thought as writing data to files, so I think that it is quite possible to write something to /dev/input/mice
for simulating mouse click without using X
.
This is what I have done:
root@linux:~$ sudo cat /dev/input/mice >> right-click
(click the right button of your mouse, and then press ctrl+c to terminate it.)
root@linux:~$ sudo cat right-click >> /dev/input/mice
I did this for testing whether writing something to /dev/input/mice
can simulate mouse click or not, but obviously it failed. Any reasons?