all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 37769@debbugs.gnu.org
Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
Date: Fri, 18 Oct 2019 05:09:36 +0200	[thread overview]
Message-ID: <87k192lpfz.fsf@gnus.org> (raw)
In-Reply-To: <20191017155844.GA4718@ACM> (Alan Mackenzie's message of "Thu, 17 Oct 2019 15:58:44 +0000")

Alan Mackenzie <acm@muc.de> writes:

>> Hm...  but you can't use S-tab on a tty, surely?
>
> _I_ can, because I've set up my (Linux) tty's keyboard and Emacs to do
> this.  (This according to a scheme written by Kalle Niemitalo about
> twenty years ago.)

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.

>> So we're offering to interactively bind a key that can't be used (after
>> this change)?  Or am I misunderstanding something?
>
> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-10-18  3:09 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 [this message]
2019-10-18  7:11       ` Eli Zaretskii
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=87k192lpfz.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37769@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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.