Re: wanted: keyboard macros in X



On Mon, Mar 22, 2004 at 12:45:09PM -0500, Brandon Craig Rhodes wrote:
> I am interested in creating a keyboard macro where, say, the F5 key
> would type the string "the" into whichever window currently had the
> keyboard focus.  I can think of various approaches:
> 
>  (1) Write a sawfish lisp function that generates the "t", "h", and
>      "e" key events, and bind the function to F5 through the sawfish
>      keymap.  But, having read the sawfish manual, I am unsure how to
>      insert events into the X event queue.

The "keyboard-paste" module available at

http://www.ewanmellor.org.uk/sawfish.html

uses the synthesize-event call to generate a mouse-middle-click event from
Sawfish.  That file also discusses the security aspects of this wrt emacsen
and terminals.  You could expand this to full keyboard macros with some
thought.

HTH,

Ewan.



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