[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: how to send a keystroke to another program



On Sat, 2003-08-02 at 00:01, Andrej Hocevar wrote:
> Hello,
> 
> I've been trying to figure out if there's a way to do this -- I'd
> like to write a program that would make another program behave as if
> a certain key was pressed, e.g. PgD. Thus I could implement
> something like moving down in a pager when I press a button on my
> mouse or something. 
> As far as I know, there is no independent way of doing this, so I'm
> looking for a way to pretend a key was pressed: so can a program
> make another program think I did that? Maybe with a pseudo terminal
> between my program and the other one? If so, where could I find more
> about ptys?
> 
> Thanks,
> 
>     andrej
> 
> -- 
> echo ${girl_name} > /etc/dumpdates
> 

Just an idea,
There was a thread not long ago about a virtual keyboard. I don't know
how it works but you can probably look at the code and check how it
sends the keys to the client window.



Reply to: