Cause a ctrl-v paste to happen from a GTK app into another window



I'm using pygtk, gtk clipboard, and running under GNOME Linux. Here's what
I'm trying to do.

   1. catch a keypress made when in another windows text field such as a
   browser
   2. popup a gtk app and process some user input
   3. copy resulting data to gtk clipboard
   4. paste data in clipboard into original window's text field
   5. clear clipboard

I'm catching the key strokes and popping up the window fine. I can copy to
the clipboard. I can close the gtk app and return focus to the original
windows text field. Only trouble is I don't know how accomplish step 4. As
it is right now, the user has to then type ctrl-v to paste from the
clipboard into the text field, I'd like to eliminate this keystroke.

Well my program is written in Python my question isn't really Python
specific, so I am fine with taking answers in any language. Any clues as to
how ctrl-v works in GNOME might help as well.

Thanks

-Jim



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