From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "David Vanderschel" Newsgroups: gmane.emacs.help Subject: Re: Changing key bindings of printable chars Date: Thu, 24 Jun 2004 23:46:16 GMT Organization: Road Runner High Speed Online http://www.rr.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <2k0tudF160v27U1@uni-berlin.de> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1088538552 26803 80.91.224.253 (29 Jun 2004 19:49:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 19:49:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 29 21:48:55 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfOb8-0000SU-00 for ; Tue, 29 Jun 2004 21:48:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfOco-0005ih-4j for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jun 2004 15:50:38 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.moat.net!border1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!cyclone.austin.rr.com!fe2.texas.rr.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Original-NNTP-Posting-Host: 66.68.174.193 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: fe2.texas.rr.com 1088120776 66.68.174.193 (Thu, 24 Jun 2004 18:46:16 CDT) Original-NNTP-Posting-Date: Thu, 24 Jun 2004 18:46:16 CDT Original-Xref: shelby.stanford.edu gnu.emacs.help:123947 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 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 Xref: main.gmane.org gmane.emacs.help:19307 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19307 "Paul Batt" wrote in message news:2k0tudF160v27U1@uni-berlin.de... > How can I change the key binding of a single printable character key to > another? I need to have "z" and "Z" print "y" and "Y" and vice versa Check out keyboard-translate-table in the "Translating Input" info node for elisp. The keyboard-translate function is probably what you need. (I just made an interesting mistake testing it: I did (keyboard-translate ?z ?y) first, and I could not easilz ( :) ) do (keyboard-translate ?y ?z) because I could no longer enter a z! I solved the problem by copying one from the buffer. Word to the wise: Compose both functions calls before executing either.) >and I need to have RET do a double-return e.g. two >line feeds instead of only one. ... I am not sure, but I think this probably requires use of the function-key-map (same info node). You may be confusing ^M and ^J. Regards, David V.