Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sending keystrokes to an X application
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Boddah
n00b
n00b


Joined: 25 Jul 2002
Posts: 8

PostPosted: Fri Jul 26, 2002 10:17 pm    Post subject: Sending keystrokes to an X application Reply with quote

I'm wondering if anyone knows how to send a keystroke to an X Window application from the shell prompt. I've just gotten my X10 Mouse Remote working, but it's limited to executing shell scripts and the like. The only thing I've found so far is part of the LIRC package, and I couldn't get it to work with my remote, and none of its utils work independent of the package.

Thaxn in advance 8)
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Jul 26, 2002 10:27 pm    Post subject: Reply with quote

One way you can do this is through the "X Test" extension. You basically send fake events to the X server using this. I am not sure whether there is an easy-to-use application that wraps this so that you don't have to write your own code.

I am not sure whether it comes in the XFree server (I am not in front of my Gentoo box). If it is, you will be able to find the header file at:

/usr/include/X11/extensions/XTest.h

EDIT: it does include the file and the extension.


Last edited by Naan Yaar on Sat Jul 27, 2002 11:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Sat Jul 27, 2002 3:18 am    Post subject: Reply with quote

You may also want to look at dcop/kdcop. The former lets you pass "commands" to KDE applications. You may be able to massage your scripts into something dcop can do.
Back to top
View user's profile Send private message
Boddah
n00b
n00b


Joined: 25 Jul 2002
Posts: 8

PostPosted: Sat Jul 27, 2002 5:13 am    Post subject: Reply with quote

Thanx for that. I've been searching for ages on how to alter the X event queue, but this looks like it should do exactly what I want. :)
Back to top
View user's profile Send private message
Boddah
n00b
n00b


Joined: 25 Jul 2002
Posts: 8

PostPosted: Sun Jul 28, 2002 1:26 pm    Post subject: Reply with quote

DCOP certainly gave me a lot of new options, but sadly, not enough applications seem to support it. There must be something floating around that allows me to queue events. :(
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Wed Aug 14, 2002 3:26 am    Post subject: Reply with quote

Found this recently. Seems like it may do what you need.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum