bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).


From: Eli Zaretskii
Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
Date: Fri, 18 Oct 2019 10:11:52 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 18 Oct 2019 05:09:36 +0200
> Cc: 37769@debbugs.gnu.org
> 
> Hm, I think I was confused thinking that TAB was the same as C-i on a
> tty, and thinking about how you can't bind C-I in non-graphical
> environments.  But I see that instead I get TAB when I run under a
> tty -- both on the TAB key and when hitting C-i?  And S-TAB gives me a
> backtab event?  But C-S-i gives me a TAB event.
> 
> Hm.

That's Emacs translation of events in action, sometimes aided by the
keyboard driver, and sometimes just an emulation (depending on the
terminal emulator you use).

> > The same problem applies to any unused keybinding involving an upper case
> > letter.   For example, if you tried to bind C-M-S-a on a tty with M-x
> > global-set-key, that function would bind C-M-a instead.  This is not
> > good.
> >
> > I can't see see any circumstances where a user would want such a
> > keybinding to be downcased.  Nearly all of the time, she will have
> > expressly pressed the shift key.
> 
> But if you M-: (global-set-key (kbd "C-M-S-o") 'previous-line) and then
> hit C-M-S-o, then Emacs will try to execute the command bound to C-M-o,
> so at least there it makes sense for the interactive spec to downcase,
> doesn't it?  Because that will at least bind something that can be
> executed with the same chord that the user hit (even if it wasn't the
> chord the user expected).
> 
> But I see that M-x global-set-key does the same under guis, and it
> doesn't make much sense there.

I admit I don't understand what both of you think is not good or make
no sense.  Emacs has been downcasing keys since day one, if the upper
case has no binding.  The reason is to allow the user not to have to
release the Shift key too fast when typing fast.





reply via email to

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