[PyKDE] Direction of output
sundance at ierne.eu.org
Wed Feb 18 22:30:01 GMT 2004
I heard ml at www.prostatepointers.org said:
> I am interested in creating a free version of the windoze program
> typeitin. It lets you generate an arbitrary number of buttoms, each
> corresponding to an appropriate phrase. For example, you might have
> To:, From:, password and so on. You focus on the target form, click
> on the appropriate typeitin button and you have the desired text
Well, I don't think there would be any purely Qt-based way to do this,
actually. What you need to do is 1) somehow get which window has the
focus without displacing the focus (might be done with Qt), and 2) send
X11 text input events to that window (and I have NO idea how to do that
If anyone knows how to do that, be it with Qt or maybe with some Python
bindings to Xlib, it'd be an interesting challenge, at any rate.
http://python-xlib.sourceforge.net/ looks like a good candidate.
In particular, look at this:
There could be another way to do a similar tool, though.
When the button for email, name, phone, etc... is pressed, copy its
content to the mouse clipboard (see the QClipboard documentation) so
that the user can just click the middle mouse button in the destination
form field to paste the appropriate text. Quite effective, if you ask
Also note that a number of Linux tools (Konqueror, Mozilla...) do
remember often used values in forms, so maybe your acquaintance's
putative problem is really a non-issue?
More information about the PyQt