LINUX.ORG.RU

mouse emulation (was «keyboard emulation»


0

0

Thanks to Murr and lg for excellent answers about keyboard emulation. IOCTLs like TIOCSTI, VT_ACTIVATE and VT_GETSTATE allows good keyboard emulation under consoles and shell. But if there any ioctls that allow emulate mouse? Now I use such approach as moving /dev/psaux to another place and creating a FIFO instead. Listening this FIFO and implementing ps/2 protocol allows to emulate mouse in QT, X and console (gpm) but real mouse doesn't work (it is necessary to make additional workaround to translate messages from/to real device). So it is a bit complicated. Any suggestions? Also is there anywhere a description of ioctls listed in "man ioctl_list"?

anonymous

Re: mouse emulation (was "keyboard emulation"

you can open pseudo tty and point X to its slave as mouse device and write to tty's master, so all written data to master appears on slave. You should write data according to protocol specified in pointer section of X config.

Such way you make mouse to work on both console and X on BSD. moused deamon transparently passes mouse events to some device and X reads them from that device ... it is even able to connect three mouses(ps/2, com, usb) and make them work on X simultaneusly using moused

lg ★★ ()

Re: mouse emulation (was "keyboard emulation"

Thank you for help. Unfortunately it needs configuration of X (or other windowing system that runs on top of Linux OS) but I need to do it transparently because I don't know clients (it could be any windowning system, even non-configurable: Qt-Embedded for instance). Also I have to notice that I use Linux OS for developement platform and there aren't moused daemon running. Though I appreciate your answers. Thank you again.

anonymous ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.