1

I noticed something odd. If I press M-P I get the message M-p is undefined rather than M-P etc.. Is there a reason for this?

Version 26.2. Using Arch Linux and the X window system.

Toothrot
  • 3,264
  • 1
  • 13
  • 32

1 Answers1

2

It's a feature. Refer to this duplicate Q&A on the main S.O. site:

https://stackoverflow.com/a/54591047/324105

It's still slightly misleading, given that in your case the lower-case sequence also has no binding (as the docs imply that the translation only occurs when there is a lower-case binding), but I think it's all part and parcel of the same mechanism.

read_key_sequence contains the following comments:

  /* If KEY is not defined in any of the keymaps,
 and cannot be part of a function key or translation,
 and is an upper case letter
 use the corresponding lower-case letter instead.  */
 [...]
  /* We have to do this unconditionally, regardless of whether
     the lower-case char is defined in the keymaps, because they
     might get translated through function-key-map.  */
  [...]
  shift_translated = true;
phils
  • 50,977
  • 3
  • 79
  • 122