all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs attach an action to any key pressed
@ 2013-06-05  5:26 Ivanov Dmitry
  2013-06-05  6:44 ` Magnar Sveen
  2013-06-05 13:02 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Ivanov Dmitry @ 2013-06-05  5:26 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Suppose, I have the code:

(defun dummy ()
      (interactive)
      (message "aaa"))

(local-set-key (kbd "<left>") 'dummy)

When you click <left> key in the current buffer, it will print "aaa".

Is it possible to attach this action to any key pressed?

I looked into "Format of Keymaps" and "Searching Keymaps" in Emacs info
pages, but found no code examples.

[-- Attachment #2: Type: text/html, Size: 525 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-05 13:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05  5:26 Emacs attach an action to any key pressed Ivanov Dmitry
2013-06-05  6:44 ` Magnar Sveen
2013-06-05  7:56   ` Ivanov Dmitry
2013-06-05 13:24     ` Kevin Rodgers
2013-06-05 13:02 ` Stefan Monnier
2013-06-05 13:48   ` Ivanov Dmitry

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.