|
From: | Kevin Rodgers |
Subject: | Re: anyway to find the key just hit in a keymap command ? |
Date: | Mon, 19 Jul 2004 10:42:50 -0600 |
User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |