Randy Kramer wrote:
> I'm looking for something a little bit more -- I understand it is one of
> the capabilities of khotkeys, but neither your article or the other one
> referenced in this thread really addressed it -- that is the ability to
> enter an arbitrary string of characters into an application (the
> application with the current focus) using a hot key.
> 
> If anybody can extend the examples to deal with this, it would be much
> appreciated!
> 
> (I wonder if dcop can work with the application with the current focus,
> or must we always specify which application / window we want to work
> with?  I tried fooling with dcop once probably 6 months to a year ago,
> but didn't get very far.  I'll try looking for my old notes -- hopefully
> I was clever enough to put them on my personal wiki.)

Following up on my own post -- below is part of the text of an article
(?) quoted from Advogato, http://www.advogato.org/article/242.html (I
just checked, the article is still available).

Unfortunately, all of the examples seem to require that you know the
name of the target application (for example "dcop kwrite KWriteIface
insertText 'Windows rocks!' true"), none of the examples seem to aim for
the window with the current focus.

Randy Kramer

<begin quote> 
Some of this already works in KDE 2, posted 11 Feb 2001 by tackat> 

What if the Unix GUI didn't need a mouse? What if every application
could be controlled solely with the keyboard? 

This is already possible in KDE 2 for a long time via DCOP. Fire up
kwrite (make sure you don't have two kwrites there at the same time --
otherwise you have to add the pid to those commands) and type into your
favourite xterm: 

--snip-- 

 dcop kwrite KWriteIface insertText 'Windows rocks!' true 

 dcop kwrite KWriteIface setCursorPosition 0 8 true 

 dcop kwrite KWriteIface insertText 'sux! KDE ' true 

 dcop kwrite KWriteIface shiftHome 

 dcop kwrite KWriteIface writeFile 'conquer_your_desktop.txt' 

--snip-- 

or check your Mail using KMail by entering: 


 dcop kmail KMailIface checkMail 

or bind the command "dcop kdesktop KScreensaverIface? lock" to your
"Pause"-key using kmenuedit. That way you can start kscreensaver by
pressing the "Pause"-key. 

To explore the possibilities you might want to use kdcop.
<end quote>

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to