为什么键绑定 M-S-t 失败而 C-S-t 有效?

Why the key binding M-S-t fails while C-S-t works?

我从 那里得到了问题,看来我们不能像 [=10] 那样将 shiftmeta 绑定=](总是翻译成M-t),但我们可以用control来做到这一点,比如C-S-t(相当于C-T)。

正如接受的答案所说,我们可以使用 M-T 代替,但为什么我们不能将其与 meta 一起使用?当与 meta 一起使用时,Emacs 会忽略 shift 吗?

我认为当不使用 Ctrl 时,Emacs 会忽略字母 S-

即特别是与 Meta 无关;同样的事情适用于其他非 Ctrl 修饰符(实际上没有其他修饰符——你也不能绑定到普通 S-t)。

理由可能是 Ctrl 键是唯一需要 字母的显式移位修饰符的情况:

(emacs) Modifier Keys

The default key bindings in Emacs are set up so that modified
alphabetical characters are case-insensitive.  In other words, ‘C-A’
does the same thing as ‘C-a’, and ‘M-A’ does the same thing as ‘M-a’.
This concerns only alphabetical characters, and does not apply to
“shifted” versions of other keys; for instance, ‘C-@’ is not the same as
‘C-2’.

   A <Control>-modified alphabetical character is always considered
case-insensitive: Emacs always treats ‘C-A’ as ‘C-a’, ‘C-B’ as ‘C-b’,
and so forth.  The reason for this is historical.

   For all other modifiers, you can make the modified alphabetical
characters case-sensitive when you customize Emacs.  For instance, you
could make ‘M-a’ and ‘M-A’ run different commands.

根据我的记忆,终端不区分控制字符的大小写,所以我推测 "historical" 原因与此有关。

至少在手册中记录这一点是合理的。如果目前不存在相关错误,您可能希望M-x report-emacs-bug提出这样的改进。

请注意,Shift 修饰符 可以 与非字母键一起使用,有或没有其他修饰符。例如,M-S-SPC 是一个可识别的序列。