unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: question about Meta + Shift modifiers: M-S-r and M-R
Date: Fri, 25 Jan 2013 16:13:50 -0800	[thread overview]
Message-ID: <5C78448DD5B849F9A64C2489478EC4D9@us.oracle.com> (raw)

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	other threads:[~2013-01-26  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26  0:13 Drew Adams [this message]
2013-01-26 10:30 ` question about Meta + Shift modifiers: M-S-r and M-R Andreas Schwab
2013-01-26 16:24   ` Drew Adams
2013-01-26 17:31     ` Andreas Schwab
2013-01-26 18:14       ` Drew Adams
2013-01-26 19:06         ` Andreas Schwab
2013-01-26 19:18           ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C78448DD5B849F9A64C2489478EC4D9@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).