[TriLUG] Simulating a key press via bash/program?

David A. Cafaro dac at trilug.org
Mon Nov 29 22:20:34 EST 2004


Figured I'd give the list a try for this one.  I have two programs, one
performs an action when the F11 key is pressed, another one performs a
user selected action when the mouse is moved to a corner of the screen. 
As an example of the mouse move action I have the program set to launch
Mozilla when I move my mouse to the top left corner of the screen.

The question is, does anyone know of a way through a script or simple
program to simulate a key press signal in X11 so that the Mouse motion
program can call a program/script to make the F11 key look like it's
been pressed triggering the action of the first program?

This is just a stop gap solution until I have the time to delve into the
individual programs themselves and tie them together as one. 
Unfortunately my C/C++ is rather rusty and I didn't have any involvement
in the two individual projects so it's going to take a while for me to
get up to speed.

For those curious the reason for this is that I'm trying to emulate the
features of MacOSX Expose features on Linux.  It's about 60-75% of the
way just using these two separate programs:

The graphical task switcher:
http://thegraveyard.org/skippy.php
The mouse action controller:
http://home.jesus.ox.ac.uk/~ecatmur/brightside/

Tie these two programs together then work on getting live versions of
the app thumbnails in skippy, and it's pretty much there.  But that's
why I was looking for the quick dirty hack just to have something
working while I work on a more elegant solution.

Thanks!
-David

-- 
David A. Cafaro
dac(at)trilug.org
Admin to User: "You did what!?!?!"




More information about the TriLUG mailing list