From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: Separate bindings for the keyboard shortcuts Ctrl-i and TAB. Date: Mon, 17 Sep 2007 15:25:54 +0200 Organization: Norwegian university of science and technology Message-ID: References: <1190018980.346341.247180@k79g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1190036472 15030 80.91.229.12 (17 Sep 2007 13:41:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2007 13:41:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 17 15:41:10 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IXGqb-0005qQ-FC for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Sep 2007 15:41:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXGqa-0007LW-Ad for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Sep 2007 09:41:08 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1190035555 29202 129.241.15.140 (17 Sep 2007 13:25:55 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Mon, 17 Sep 2007 13:25:55 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:DfW6AfE5e6ScYlJrHJWjLOqh2fM= Original-Xref: shelby.stanford.edu gnu.emacs.help:152130 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47640 Archived-At: + Peter Dyballa : > Am 17.09.2007 um 10:49 schrieb Nordlöw: > >> The reason is that I want Ctrl-i to indent as usual >> and TAB to do completion (hippie-expand) instead. > > By law (ASCII, ISO 8859, Unicode, and proprietary standards) both are > the same. > > In X11 you can map whatever to the TAB key. In X11 the key is, by default, mapped to the TAB character (ASCII 9). This is done in function-key-map, so to map and C-i to different keys, the sensible ting would be to remove the translation from function-key-map, then rebind it to whatever you wish. Note, however, that since function-key-map is a global map, applied before any other key processing, this will have side effects in /every/ mode, not just where you wanted separate definitions. You could circumvent this in various hackish ways, I suppose, like binding in the global keymap to a function that looks up C-i in the current keymaps and executes the result. But I don't know enough about event handling in emacs to tell you what the gotchas of such an approach might be. Maybe you could bind to a macro that runs C-i? Might be worth a try. -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell