all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: acm@muc.de, 37769@debbugs.gnu.org
Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
Date: Fri, 18 Oct 2019 10:11:52 +0300	[thread overview]
Message-ID: <83tv868r47.fsf@gnu.org> (raw)
In-Reply-To: <87k192lpfz.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri,  18 Oct 2019 05:09:36 +0200)

> 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	other threads:[~2019-10-18  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 19:07 bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab) Alan Mackenzie
2019-10-17  3:00 ` Lars Ingebrigtsen
2019-10-17  8:16   ` Eli Zaretskii
2019-10-17 15:58   ` Alan Mackenzie
2019-10-18  3:09     ` Lars Ingebrigtsen
2019-10-18  7:11       ` Eli Zaretskii [this message]
2019-10-19  8:02         ` Lars Ingebrigtsen
2019-10-19  8:53           ` Andreas Schwab
2019-10-19  9:03             ` Lars Ingebrigtsen
2019-10-19  9:36           ` Eli Zaretskii
2019-10-19 18:26             ` Alan Mackenzie
2019-10-17  9:17 ` Andreas Schwab
2019-10-17 16:00   ` Alan Mackenzie

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=83tv868r47.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37769@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=larsi@gnus.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.