emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question about Meta + Shift modifiers: M-S-r and M-R


From: Drew Adams
Subject: question about Meta + Shift modifiers: M-S-r and M-R
Date: Fri, 25 Jan 2013 16:13:50 -0800

Someone will hopefully remind me of something simple that has disappeared from
my memory at the moment.  Or perhaps there is a bug somewhere?  I really don't
know what I might be missing at this point.

Why is it that `M-S-r' is not the same key sequence as `M-R', at least
sometimes?

(global-set-key "\M-\S-r" 'forward-char)
C-h k ; then press Alt + Shift + r
Says that M-R is bound to `forward-char'.

(global-set-key (kbd "M-R" 'forward-char)
has the same effect.

Fair enough.  But is calling this `M-R' just a nice shorthand,
or does Emacs simply not consider this key sequence as being
the same as `r' plus the modifiers Meta and Shift?

(global-set-key "\M-\S-r" nil) ; Cancel that.

(global-set-key (kbd "M-S-r" 'forward-char)

C-h w forward-char says that it is on `M-S-r'.
C-h k ; press the same chord.
Says the same thing it said when bound to nil.

`M-S-r' is acceptable as a key sequence for binding, and it gets bound as
expected, but it apparently does not mean the same thing as pressing that chord.
What possible combination of physical keys might it actually represent?

Which part of the manual am I not finding or misreading, which would explain all
of this?  Searching for `Shift', which the discussion would presumably need to
mention, finds nothing pertinent, AFAICT.  Likewise, searching for `uppercase'
and `lowercase'.

It seems clear (now) that the _only_ external representation that Emacs uses and
recognizes for that chord is `M-R'.  That would explain why (kbd "M-S-r") does
not do the same thing.

But (kbd "M-S-r") is acceptable and clearly binds _some_ key sequence - which
one?  What real key sequence does it represent?  Or what irreal one could it
represent, given an arbitrary fictional keyboard?

Somehow I mistakenly got the impression that `M-S-r' would be just another
external way to refer to the same chord that `M-R' refers to.




reply via email to

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