unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* macro with keypad three
@ 2008-10-08 13:04 Stefan Thomas
  2008-10-08 14:43 ` Peter Dyballa
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Thomas @ 2008-10-08 13:04 UTC (permalink / raw
  To: help-gnu-emacs

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

Dear emacs-users,
I have defined a new macro, that I can execute in shell mode with C-3:
(fset 'dreiklang
   (lambda (&optional arg) "Keyboard macro." (interactive "p")
(kmacro-exec-ring-item (quote ([67108896 134217779 134217826 134217847 60 21
67108896 2 62 5] 0 "%d")) arg)))
(global-set-key [?\C-3] 'dreiklang)
 But I want to execute this macro with the 3 of the keypad. How can I define
this?
Thanks for Your help,
Stefan

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

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

* Re: macro with keypad three
  2008-10-08 13:04 macro with keypad three Stefan Thomas
@ 2008-10-08 14:43 ` Peter Dyballa
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2008-10-08 14:43 UTC (permalink / raw
  To: Stefan Thomas; +Cc: help-gnu-emacs


Am 08.10.2008 um 15:04 schrieb Stefan Thomas:

> But I want to execute this macro with the 3 of the keypad. How can  
> I define
> this?

kp-3 instead of 3 ? C-h k <your key> will tell you the key's name and  
bindings.

--
Mit friedvollen Grüßen

   Pete

"No man was ever taken to hell by a woman unless he already had a  
ticket in his pocket, or at least had been fooling around with  
timetables."
				– Archie Goodwin







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

* Re: macro with keypad three
       [not found] <mailman.561.1223471058.25473.help-gnu-emacs@gnu.org>
@ 2008-10-08 17:20 ` Xah
  0 siblings, 0 replies; 3+ messages in thread
From: Xah @ 2008-10-08 17:20 UTC (permalink / raw
  To: help-gnu-emacs

"Stefan Thomas" wrote:
> (global-set-key [?\C-3] 'dreiklang)
>  But I want to execute this macro with the 3 of the keypad. How can I define
> this?

In short, like this:

(global-set-key (kbd "<kp-4>") 'backward-punctuation)

For more detail, see:

How to Define Keyboard Shortcuts in Emacs
http://xahlee.org/emacs/keyboard_shortcuts.html

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-08 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 13:04 macro with keypad three Stefan Thomas
2008-10-08 14:43 ` Peter Dyballa
     [not found] <mailman.561.1223471058.25473.help-gnu-emacs@gnu.org>
2008-10-08 17:20 ` Xah

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).