* anyway to find the key just hit in a keymap command ?
@ 2004-07-18 13:40 abel elenas
2004-07-19 16:42 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: abel elenas @ 2004-07-18 13:40 UTC (permalink / raw)
I am trying to make a keymap 4 a mode in emacs.
the commands run by many key is the same but it needs to know the key
just hit...
(define-key sel-key-map "e" 'sel-insert)
(defun sel-insert (&optional nbr)
(interactive "p")
(put-char-just-hit-in-table char)
(self-insert-command (or nbr 1)))
But i don't know the way to get the char that have just been hit ...
Any way to do that ? (Self-insert-command seems to find it easy but i
don't know how...
thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: anyway to find the key just hit in a keymap command ?
2004-07-18 13:40 anyway to find the key just hit in a keymap command ? abel elenas
@ 2004-07-19 16:42 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2004-07-19 16:42 UTC (permalink / raw)
abel elenas wrote:
> I am trying to make a keymap 4 a mode in emacs.
> the commands run by many key is the same but it needs to know the key
> just hit...
>
> (define-key sel-key-map "e" 'sel-insert)
>
> (defun sel-insert (&optional nbr)
> (interactive "p")
> (put-char-just-hit-in-table char)
> (self-insert-command (or nbr 1)))
>
> But i don't know the way to get the char that have just been hit ...
> Any way to do that ? (Self-insert-command seems to find it easy but i
> don't know how...
C-h f this-command-keys
C-h v last-command-event
See the Command Loop Info node of the Emacs Lisp manual.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-19 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-18 13:40 anyway to find the key just hit in a keymap command ? abel elenas
2004-07-19 16:42 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).