public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* stuffing characters to keyboard buffer.
@ 2005-05-02 16:29 P.Manohar
  2005-05-02 16:52 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: P.Manohar @ 2005-05-02 16:29 UTC (permalink / raw)
  To: linux-kernel


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,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stuffing characters to keyboard buffer.
  2005-05-02 16:29 stuffing characters to keyboard buffer P.Manohar
@ 2005-05-02 16:52 ` Dmitry Torokhov
  2005-05-04  8:47   ` P.Manohar
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2005-05-02 16:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stuffing characters to keyboard buffer.
  2005-05-02 16:52 ` Dmitry Torokhov
@ 2005-05-04  8:47   ` P.Manohar
  0 siblings, 0 replies; 3+ messages in thread
From: P.Manohar @ 2005-05-04  8:47 UTC (permalink / raw)
  To: linux-kernel


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,


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-04  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 16:29 stuffing characters to keyboard buffer P.Manohar
2005-05-02 16:52 ` Dmitry Torokhov
2005-05-04  8:47   ` P.Manohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox