all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Emacs23 on a Mac, how to get keypad to send kp-4, etc.?
       [not found]   ` <3c521f34-3b6a-4fc1-beca-53630ed1c8da@x16g2000yqg.googlegroups.com>
@ 2011-07-08 20:38     ` Michael Heerdegen
  0 siblings, 0 replies; only message in thread
From: Michael Heerdegen @ 2011-07-08 20:38 UTC (permalink / raw)
  To: Emacs mailing list

Hi,

in my Emacs 23.3 (on Debian), the kp keys are bound in simple.el, in
this expression:

(mapc
 (lambda (keypad-normal)
   (let ((keypad (nth 0 keypad-normal))
	 (normal (nth 1 keypad-normal)))
     (put keypad 'ascii-character normal)
     (define-key function-key-map (vector keypad) (vector normal))))
 '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4)
   (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
   (kp-space ?\s)
   (kp-tab ?\t)
   (kp-enter ?\r)
   (kp-multiply ?*)
   (kp-add ?+)
   (kp-separator ?,)
   (kp-subtract ?-)
   (kp-decimal ?.)
   (kp-divide ?/)
   (kp-equal ?=)
   ;; Do the same for various keys that are represented as symbols under
   ;; GUIs but naturally correspond to characters.
   (backspace 127)
   (delete 127)
   (tab ?\t)
   (linefeed ?\n)
   (clear ?\C-l)
   (return ?\C-m)
   (escape ?\e)))

This is done by default.  But you can just unbind them, like this:

(mapc
 (lambda (key)
   (define-key function-key-map (vector key) nil))
 '((kp-0) (kp-1) (kp-2) (kp-3) (kp-4)
   (kp-5) (kp-6) (kp-7) (kp-8) (kp-9)))

You can also add kp-space etc. to the list.

Does that what you want?


Best,

Michael.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-08 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <eb6f5182-1e89-4ac5-803e-2768942c3667@b21g2000yqc.googlegroups.com>
     [not found] ` <1ead7a78-d372-4281-ba9f-3a26819a61a1@h12g2000vbx.googlegroups.com>
     [not found]   ` <3c521f34-3b6a-4fc1-beca-53630ed1c8da@x16g2000yqg.googlegroups.com>
2011-07-08 20:38     ` Emacs23 on a Mac, how to get keypad to send kp-4, etc.? Michael Heerdegen

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.