From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Emacs23 on a Mac, how to get keypad to send kp-4, etc.? Date: Fri, 08 Jul 2011 22:38:39 +0200 Message-ID: <87iprcy0c0.fsf@web.de> References: <1ead7a78-d372-4281-ba9f-3a26819a61a1@h12g2000vbx.googlegroups.com> <3c521f34-3b6a-4fc1-beca-53630ed1c8da@x16g2000yqg.googlegroups.com> Reply-To: michael_heerdegen@web.de NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310157764 28967 80.91.229.12 (8 Jul 2011 20:42:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 20:42:44 +0000 (UTC) To: Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 22:42:39 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QfHsf-0004yW-RP for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 22:42:33 +0200 Original-Received: from localhost ([::1]:55427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfHse-00019w-Hr for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 16:42:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfHou-0000jq-Vz for help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 16:38:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfHoq-00013X-MN for help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 16:38:40 -0400 Original-Received: from fmmailgate01.web.de ([217.72.192.221]:58567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfHoq-00012s-4O for help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 16:38:36 -0400 Original-Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate01.web.de (Postfix) with ESMTP id 583E11939A09E for ; Fri, 8 Jul 2011 22:38:06 +0200 (CEST) Original-Received: from [89.204.153.216] (helo=snow) by smtp04.web.de with asmtp (WEB.DE 4.110 #2) id 1QfHoL-0003Dz-00 for help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 22:38:06 +0200 In-Reply-To: <3c521f34-3b6a-4fc1-beca-53630ed1c8da@x16g2000yqg.googlegroups.com> (gentsquash@gmail.com's message of "Fri, 8 Jul 2011 10:34:54 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Sender: michael_heerdegen@web.de X-Provags-ID: V01U2FsdGVkX1+GkFSl617NxQL+hiDRqmdfMaZD8+z3tL+wxEqu 5JioIFLw/uAuMfQf2TPWtcfHIULYm4r4keAbwGmEMouYf+zTZ/ /sX6U1JpkhjwMSx4uiIw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81529 Archived-At: 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.