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: Lars Ingebrigtsen
Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
Date: Fri, 18 Oct 2019 05:09:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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 via email to

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