From: Robert Epprecht
Subject: elisp: how to simulate key pressing?
Date:
Message-ID: <m1puysz1sj.fsf@pc.home>
Hi,
please tell me how I can code a function in elisp, that when
called looks for Emacs, as if the user had pressed a certain
key sequence.
Thanks a lot,
Robert Epprecht
In article <··············@pc.home>,
Robert Epprecht <········@sunweb.ch> wrote:
>please tell me how I can code a function in elisp, that when
>called looks for Emacs, as if the user had pressed a certain
>key sequence.
You'll do better to ask this in an Emacs newsgroup, this isn't really about
Lisp. Try gnu.emacs.help or comp.emacs.
--
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Christopher R. Barry
Subject: Re: elisp: how to simulate key pressing?
Date:
Message-ID: <87so3oxjzb.fsf@2xtreme.net>
Robert Epprecht <········@sunweb.ch> writes:
> please tell me how I can code a function in elisp, that when
> called looks for Emacs, as if the user had pressed a certain
> key sequence.
Every key sequence is bound to a command (an interactive function).
Type "C-h c <key-sequence>" to see what command is bound to that key
sequence. C-h k is more descriptive.
Christopher
(Followups set to comp.emacs.xemacs)
* Robert Epprecht wrote:
> please tell me how I can code a function in elisp, that when
> called looks for Emacs, as if the user had pressed a certain
> key sequence.
if you're using xemacs (don't know about FSF emacs any more) things
are represented by events. You can create an event and then push it
onto unread-command-events from where it will be read as if it had
been a real one.
--tim