hai,
I want to stuff the characters received on a serial line into the
keyboard buffer, so that they will be send to applications as if they are
coming from keyboard irrespective of console or x-windows mode.
For this purpose, I planned to use ioctls. Can anybody tell how to
send an ioctl to keyboard driver?
AFAIK, tty_flip_buffer is the buffer from which both console and
x-windows will take input. If we insert into this buffer, I think the
purpose will be served. Now the question is how to send ioctl to this
buffer.
can you please give any suggestions on this?
Thanks&Regards,
P.Manohar,
Hi,
On Monday 02 May 2005 11:29, P.Manohar wrote:
>
> hai,
> I want to stuff the characters received on a serial line into the
> keyboard buffer, so that they will be send to applications as if they are
> coming from keyboard irrespective of console or x-windows mode.
>
> For this purpose, I planned to use ioctls. Can anybody tell how to
> send an ioctl to keyboard driver?
>
If you are working with 2.6 you'd need to create an input device, probably
working on top of serport driver, like sermouse does. You may also want to
take a look at uinput driver - it allows to create userspace-driven input
devices.
--
Dmitry
I am working in
2.4.20-8 kernel.
To fill the keyboard buffer with characters from user space, I used
TIOCSTI
ioctls. Is there a similar method so I can send raw keyboard codes into
the scancode buffer?
ioctls("/dev/tty0",TIOCSTI,&c);
it worked in Console.
ioctls("/dev/tty7",TIOCSTI,&c);
is not working in x-windows. Here c is a character.
Can you guide me in this regard.
ThanksInAdvance,
P.Manohar,