# HG changeset patch # User Jim Blandy # Date 741558853 0 # Node ID 924d8515c25035774f1aaae203121876fcb1e774 # Parent 535f1f575d045147c5199d5afe8c87439596648e * simple.el: Add bindings to function-key-map so that the keypad keys act like ordinary self-insertion keys, unless explicitly bound. diff -r 535f1f575d04 -r 924d8515c250 lisp/simple.el --- 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