GNU bug report logs - #11011
kbd and TAB with modifiers (eg S-TAB)

Previous Next

Package: emacs;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Wed, 14 Mar 2012 07:44:01 UTC

Severity: normal

Tags: confirmed, notabug

Found in version 28.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00037.html

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11011 in the body.
You can then email your comments to 11011 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Wed, 14 Mar 2012 07:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antoine Levitt <antoine.levitt <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Mar 2012 07:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Antoine Levitt <antoine.levitt <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Binding S-TAB
Date: Wed, 14 Mar 2012 08:12:23 +0100
From a posting on emacs-devel:

Antoine Levitt <antoine.levitt <at> gmail.com>:

> Alright, I thought (kbd "S-TAB") would do the right thing, but
> apparently not. I'm thoroughly confused by emacs keybinding system.

Chong Yidong <cyd <at> gnu.org>:

> I think this is a bug in kbd.  It doesn't seem to handle TAB with
> modifiers right.  Please file a bug.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Wed, 14 Mar 2012 09:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: David De La Harpe Golden <david <at> harpegolden.net>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: 11011 <at> debbugs.gnu.org
Subject: Re: bug#11011: Binding S-TAB
Date: Wed, 14 Mar 2012 08:53:02 +0000
On 14/03/12 07:12, Antoine Levitt wrote:
>  From a posting on emacs-devel:
>
> Antoine Levitt<antoine.levitt <at> gmail.com>:
>
>> Alright, I thought (kbd "S-TAB") would do the right thing, but
>> apparently not. I'm thoroughly confused by emacs keybinding system.
>
> Chong Yidong<cyd <at> gnu.org>:
>
>> I think this is a bug in kbd.  It doesn't seem to handle TAB with
>> modifiers right.  Please file a bug.
>
>
>
>

works for me (tm). what platform are we talking about?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Wed, 14 Mar 2012 09:30:03 GMT) Full text and rfc822 format available.

Message #11 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Antoine Levitt <antoine.levitt <at> gmail.com>
To: David De La Harpe Golden <david <at> harpegolden.net>
Cc: 11011 <at> debbugs.gnu.org
Subject: Re: bug#11011: Binding S-TAB
Date: Wed, 14 Mar 2012 09:58:26 +0100
14/03/12 09:53, David De La Harpe Golden
> On 14/03/12 07:12, Antoine Levitt wrote:
>>  From a posting on emacs-devel:
>>
>> Antoine Levitt<antoine.levitt <at> gmail.com>:
>>
>>> Alright, I thought (kbd "S-TAB") would do the right thing, but
>>> apparently not. I'm thoroughly confused by emacs keybinding system.
>>
>> Chong Yidong<cyd <at> gnu.org>:
>>
>>> I think this is a bug in kbd.  It doesn't seem to handle TAB with
>>> modifiers right.  Please file a bug.
>>
>>
>>
>>
>
> works for me (tm). what platform are we talking about?

I'm using Ubuntu 11.10, with gnome/metacity. (on a french keyboard)

Typing S-TAB gives:
<backtab> (translated from <S-iso-lefttab>) is undefined




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Wed, 14 Mar 2012 09:44:02 GMT) Full text and rfc822 format available.

Message #14 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: David De La Harpe Golden <david <at> harpegolden.net>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: 11011 <at> debbugs.gnu.org
Subject: Re: bug#11011: Binding S-TAB
Date: Wed, 14 Mar 2012 09:12:52 +0000
On 14/03/12 08:58, Antoine Levitt wrote:

>> works for me (tm). what platform are we talking about?
>
> I'm using Ubuntu 11.10, with gnome/metacity. (on a french keyboard)
>
> Typing S-TAB gives:
> <backtab>  (translated from<S-iso-lefttab>) is undefined


I'm just wrong, sorry for the noise - I overconfidently answered without 
rechecking my .emacs, I was actually doing:

(global-set-key (kbd "<backtab>") ...)

probably /because/ the more naive "S-" didn't work.






Changed bug title to 'kbd and TAB with modifiers (eg S-TAB)' from 'Binding S-TAB' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 14 Mar 2012 17:26:02 GMT) Full text and rfc822 format available.

Set bug forwarded-to-address to 'http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00037.html'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 14 Mar 2012 17:26:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Thu, 20 Aug 2020 19:07:01 GMT) Full text and rfc822 format available.

Message #21 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: 11011 <at> debbugs.gnu.org
Subject: Re: bug#11011: Binding S-TAB
Date: Thu, 20 Aug 2020 12:06:44 -0700
found 11011 28.0.50
tags 11011 + confirmed
thanks

Antoine Levitt <antoine.levitt <at> gmail.com> writes:

>>From a posting on emacs-devel:
>
> Antoine Levitt <antoine.levitt <at> gmail.com>:
>
>> Alright, I thought (kbd "S-TAB") would do the right thing, but
>> apparently not. I'm thoroughly confused by emacs keybinding system.
>
> Chong Yidong <cyd <at> gnu.org>:
>
>> I think this is a bug in kbd.  It doesn't seem to handle TAB with
>> modifiers right.  Please file a bug.

I can reproduce this on current master:

0. emacs -Q
1. (global-set-key (kbd "S-TAB") (lambda () (message "FOO")))
2. S-TAB

And see the following error: "<backtab> is undefined"

Best regards,
Stefan Kangas




bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 19:07:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 19:07:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Thu, 20 Aug 2020 19:37:02 GMT) Full text and rfc822 format available.

Message #28 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: Re: bug#11011: Binding S-TAB
Date: Thu, 20 Aug 2020 22:35:59 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 20 Aug 2020 12:06:44 -0700
> Cc: 11011 <at> debbugs.gnu.org
> 
> 0. emacs -Q
> 1. (global-set-key (kbd "S-TAB") (lambda () (message "FOO")))
> 2. S-TAB
> 
> And see the following error: "<backtab> is undefined"

You say "S-TAB", but that's not the key you pressed.  You pressed
<backtab>, a function key, whereas S-TAB is a shifted ASCII character.
Try "C-S-i" instead (which will also reveal a minor unrelated bug in
your recipe ;-).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Thu, 20 Aug 2020 20:19:02 GMT) Full text and rfc822 format available.

Message #31 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefan <at> marxist.se>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: RE: bug#11011: Binding S-TAB
Date: Thu, 20 Aug 2020 13:16:04 -0700 (PDT)
> > 0. emacs -Q
> > 1. (global-set-key (kbd "S-TAB") (lambda () (message "FOO")))
> > 2. S-TAB
> >
> > And see the following error: "<backtab> is undefined"
> 
> You say "S-TAB", but that's not the key you pressed.  You pressed
> <backtab>, a function key, whereas S-TAB is a shifted ASCII character.
> Try "C-S-i" instead (which will also reveal a minor unrelated bug in
> your recipe ;-).

I was going to say the same thing, or similar.

`TAB` = `C-i`.

`TAB' is not the same as `<tab>'.

(kbd "S-<tab>") => [S-tab]
(kbd "S-TAB")   => [33554441]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Thu, 20 Aug 2020 21:42:01 GMT) Full text and rfc822 format available.

Message #34 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: Re: bug#11011: Binding S-TAB
Date: Thu, 20 Aug 2020 14:41:19 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Stefan Kangas <stefan <at> marxist.se>
>> Date: Thu, 20 Aug 2020 12:06:44 -0700
>> Cc: 11011 <at> debbugs.gnu.org
>>
>> 0. emacs -Q
>> 1. (global-set-key (kbd "S-TAB") (lambda () (message "FOO")))
>> 2. S-TAB
>>
>> And see the following error: "<backtab> is undefined"
>
> You say "S-TAB", but that's not the key you pressed.  You pressed
> <backtab>, a function key, whereas S-TAB is a shifted ASCII
> character. Try "C-S-i" instead (which will also reveal a minor
> unrelated bug in your recipe ;-).

Hmm, now I see.  This stuff always manages to confuse me.  And I guess
it also managed to confused Chong Yidong...?

Not sure if there's anything to do here, if this is as it should be.
Notabug?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Fri, 21 Aug 2020 06:11:01 GMT) Full text and rfc822 format available.

Message #37 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: Re: bug#11011: Binding S-TAB
Date: Fri, 21 Aug 2020 09:10:21 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 20 Aug 2020 14:41:19 -0700
> Cc: antoine.levitt <at> gmail.com, 11011 <at> debbugs.gnu.org
> 
> > You say "S-TAB", but that's not the key you pressed.  You pressed
> > <backtab>, a function key, whereas S-TAB is a shifted ASCII
> > character. Try "C-S-i" instead (which will also reveal a minor
> > unrelated bug in your recipe ;-).
> 
> Hmm, now I see.  This stuff always manages to confuse me.  And I guess
> it also managed to confused Chong Yidong...?
> 
> Not sure if there's anything to do here, if this is as it should be.
> Notabug?

Yes, I think this is just a confusing subtlety of function keys vs
ASCII keys on a modern keyboard.  The OP should have bound <backtab>,
not S-TAB.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Fri, 21 Aug 2020 06:56:02 GMT) Full text and rfc822 format available.

Message #40 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: Re: bug#11011: Binding S-TAB
Date: Thu, 20 Aug 2020 23:55:06 -0700
tags 11011 notabug
close 11011
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

>> Not sure if there's anything to do here, if this is as it should be.
>> Notabug?
>
> Yes, I think this is just a confusing subtlety of function keys vs
> ASCII keys on a modern keyboard.  The OP should have bound <backtab>,
> not S-TAB.

Thanks, so I'm closing this bug report now.

Best regards,
Stefan Kangas




Added tag(s) notabug. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 06:56:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 11011 <at> debbugs.gnu.org and Antoine Levitt <antoine.levitt <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 06:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Fri, 21 Aug 2020 07:13:02 GMT) Full text and rfc822 format available.

Message #47 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: Re: bug#11011: Binding S-TAB
Date: Fri, 21 Aug 2020 10:12:03 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 20 Aug 2020 23:55:06 -0700
> Cc: antoine.levitt <at> gmail.com, 11011 <at> debbugs.gnu.org
> 
> > Yes, I think this is just a confusing subtlety of function keys vs
> > ASCII keys on a modern keyboard.  The OP should have bound <backtab>,
> > not S-TAB.

Btw, binding <S-tab> would have also done TRT in that use case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11011; Package emacs. (Fri, 21 Aug 2020 15:21:01 GMT) Full text and rfc822 format available.

Message #50 received at 11011 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefan <at> marxist.se>
Cc: 11011 <at> debbugs.gnu.org, antoine.levitt <at> gmail.com
Subject: RE: bug#11011: Binding S-TAB
Date: Fri, 21 Aug 2020 15:17:54 +0000 (UTC)
> Btw, binding <S-tab> would have also done TRT in that use case.

Yes.  IIUC, to be more exact, <backtab> takes care of two cases:
<S-tab> and <S-iso-lefttab>.

To get the effect of <backtab> for Emacs prior to 22 you had to
bind both of those keys ([S-tab] and [S-iso-lefttab]).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.