From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Chong Yidong <cyd@gnu.org>, emacs-devel@gnu.org
Subject: Re: Is there a canonical key for S-tab?
Date: Wed, 14 Mar 2012 09:07:14 -0400 [thread overview]
Message-ID: <jwv62e7wd9n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2zkbjmt41.fsf@igel.home> (Andreas Schwab's message of "Wed, 14 Mar 2012 10:25:50 +0100")
>> I think this is a bug in kbd. It doesn't seem to handle TAB with
>> modifiers right.
> Looks correct for me:
ELISP> (kbd "S-TAB")
> [33554441]
ELISP> (key-description (kbd "S-TAB"))
> "S-TAB"
ELISP> (eq (aref (kbd "S-TAB") 0) ?\S-\t)
> t
I think the problem is that it's nowhere defined what "correct"
should be. The above shows that `kbd' is at least returning consistent
results, but the way we handle events (especially events that can
sometimes be represented by chars) is not always consistent.
E.g. I don't think the C code together with the various remapping
keymaps will ever generate a ?\S-\t char, instead they'll generate
either an `S-tab' symbol, or a `backtab' symbol.
Stefan
PS: This reminds me of a related issue: we currently remap the `tab'
symbol to ?\C-i, the `return' symbol to ?\C-m, largely for historical
reasons. It would actually be better to do it the other way around
(i.e. remap ttys's ?\C-i and ?\C-m to `tab' and `return'). One of the
advantages is that a GUI-only user could then more easily bind `tab',
`return', C-m, and C-i independently.
next prev parent reply other threads:[~2012-03-14 13:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 9:37 Is there a canonical key for S-tab? Leo
2012-03-04 10:05 ` Andreas Schwab
2012-03-04 10:19 ` Antoine Levitt
2012-03-04 10:31 ` Andreas Schwab
2012-03-04 10:52 ` Antoine Levitt
2012-03-14 6:19 ` Chong Yidong
2012-03-14 9:25 ` Andreas Schwab
2012-03-14 13:07 ` Stefan Monnier [this message]
2012-03-15 8:10 ` Ivan Andrus
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=jwv62e7wd9n.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=schwab@linux-m68k.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.