Re: wanted: keyboard macros in X
- From: Ewan Mellor <sawfish ewanmellor org uk>
- To: Brandon Craig Rhodes <brandon rhodesmill org>
- Cc: Sawfish List <sawfish-list gnome org>
- Subject: Re: wanted: keyboard macros in X
- Date: Tue, 23 Mar 2004 09:05:08 +0000
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]