From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Key binding syntax Date: Mon, 11 Apr 2005 16:24:30 -0600 Message-ID: References: <16986.60027.717280.145858@dionysus.ucolick.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1113258801 25027 80.91.229.2 (11 Apr 2005 22:33:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2005 22:33:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 12 00:33:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DL7R2-0003bp-TG for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Apr 2005 00:31:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL71F-0006PQ-1U for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2005 18:04:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DL6zp-0005vz-7r for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 18:03:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DL6zg-0005rL-Ss for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 18:02:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL6zf-0005nl-B7 for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 18:02:55 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DL7M2-0005AT-T2 for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 18:26:03 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DL7ID-0002YB-Rq for help-gnu-emacs@gnu.org; Tue, 12 Apr 2005 00:22:05 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Apr 2005 00:22:05 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Apr 2005 00:22:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 63 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <16986.60027.717280.145858@dionysus.ucolick.org> 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:25589 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25589 Greg Novak wrote: > I'm having a difficult time rebinding Shift-tab or Control tab. I've > tried: > > [?\C-tab] That won't work, because the part that follows ?\C- must be a character, and the tab symbol represents a function key. If you evaluate that, you get [20 ab], which is a vector of the Control-t character and the ab symbol. > [?\C- tab] Similarly, that is Control-SPC followed by the tab symbol/function key. > "\C-" > "\C-[tab]" Those appear to be random guesses. (Within a string, you can only have characters.) is a human-readable output representation for the function key, not a Lisp-readable input representation. [tab] is a readable input representation for the function key, but it doesn't have any special meaning within a string. > "\C-\t" If you try to evaluate that, you get an "Invalid modifier in string" error. That's because the \t character (aka TAB) is already a control character (Control-i). I'll admit, I don't know why the analogous vector notation [?\C-\t] doesn't fail for that same reason. > as the first argument to local-set-key and none of them seem to work. > I've read the Emacs manual and the Elisp manual, but I can't find the > information I need. I would use [C-tab] and [S-tab], to bind the modified tab function key (vs. the modified TAB character, which is problematical). > I also did "apropos-command key" looking for a command where I can hit > a key and have emacs tell me the exact text that should go into the > first argument to local-set-key in order to rebind the key. Much like > describe-key, but telling me how to rebind it, not what the current > current binding happens to be. Try typing `C-h k' followed by the key sequence you want to bind, and then `C-h l'. It will show `C-h k C-h l' in the *Help* buffer. The idiot-proof way to make use of that information (please note, I'm not calling you an idiot!) is: (kbd "") which evaluates to [C-tab]. > I still think that this function must exist, and I'm just not finding > it. So before I try to write it myself, I thought I'd consult the > list... -- Kevin Rodgers