changeset 3947:924d8515c250

* simple.el: Add bindings to function-key-map so that the keypad keys act like ordinary self-insertion keys, unless explicitly bound.
author Jim Blandy <jimb@redhat.com>
date Thu, 01 Jul 1993 20:34:13 +0000
parents 535f1f575d04
children 33d46b047130
files lisp/simple.el
diffstat 1 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Thu Jul 01 20:33:56 1993 +0000
+++ b/lisp/simple.el	Thu Jul 01 20:34:13 1993 +0000
@@ -2182,4 +2182,30 @@
 	       (eval-minibuffer (format "Set %s to value: " var)))))))
   (set var val))
 
+
+;;;; Keypad support.
+
+;;; Make the keypad keys act like ordinary typing keys.  If people add
+;;; bindings for the function key symbols, then those bindings will
+;;; override these, so this shouldn't interfere with any existing
+;;; bindings.
+
+(mapcar
+ (lambda (keypad-normal)
+   (let ((keypad (nth 0 keypad-normal))
+	 (normal (nth 1 keypad-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 ?\ )
+   (kp-tab ?\t)
+   (kp-enter ?\r)
+   (kp-multiply ?*)
+   (kp-add ?+)
+   (kp-separator ?,)
+   (kp-subtract ?-)
+   (kp-decimal ?.)
+   (kp-divide ?/)
+   (kp-equal ?=)))
+
 ;;; simple.el ends here