all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: help-gnu-emacs@gnu.org
Subject: Re: Separate bindings for the keyboard shortcuts Ctrl-i and TAB.
Date: Mon, 17 Sep 2007 15:25:54 +0200	[thread overview]
Message-ID: <pco1wcxbezh.fsf@shuttle.math.ntnu.no> (raw)
In-Reply-To: mailman.942.1190027818.18990.help-gnu-emacs@gnu.org

+ Peter Dyballa <Peter_Dyballa@Web.DE>:

> 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 <tab> key is, by default, mapped to the TAB character
(ASCII 9).  This is done in function-key-map, so to map <tab> and C-i
to different keys, the sensible ting would be to remove the <tab>
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
<tab> 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 <tab> to a macro that runs
C-i?  Might be worth a try.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell

  parent reply	other threads:[~2007-09-17 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17  8:49 Separate bindings for the keyboard shortcuts Ctrl-i and TAB Nordlöw
2007-09-17 11:16 ` Peter Dyballa
     [not found] ` <mailman.942.1190027818.18990.help-gnu-emacs@gnu.org>
2007-09-17 13:25   ` Harald Hanche-Olsen [this message]
2007-09-20 18:23     ` Johan Bockgård
2007-09-20 19:37       ` Harald Hanche-Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pco1wcxbezh.fsf@shuttle.math.ntnu.no \
    --to=hanche@math.ntnu.no \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.