help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How can a command find out which key-sequence has evoked it?


From: esabof
Subject: Re: How can a command find out which key-sequence has evoked it?
Date: Fri, 31 May 2013 12:30:31 -0700 (PDT)
User-agent: G2/1.0

Found it:

(global-set-key
 (kbd "C-x C-v C-b")
 (lambda () 
   (interactive)
   (message "Evoked by: %s"
            (key-description (this-command-keys)))))

On Friday, May 31, 2013 7:45:39 PM UTC+1, esa...@gmail.com wrote:
> Ideally in kbd syntax.
> 
> 
> 
> Evgeni


reply via email to

[Prev in Thread] Current Thread [Next in Thread]