emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a canonical key for S-tab?


From: Stefan Monnier
Subject: Re: Is there a canonical key for S-tab?
Date: Wed, 14 Mar 2012 09:07:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

>> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]