emacs-devel
[Top][All Lists]
Advanced

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

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


From: Drew Adams
Subject: RE: question about Meta + Shift modifiers: M-S-r and M-R
Date: Sat, 26 Jan 2013 10:14:45 -0800

> > It has _something_ to do with Meta, in that the same is not 
> > true for C-S-r or C-M-S-r etc.
> 
> (equal (kbd "C-S-r")   (kbd "C-R"))   => nil
> (equal (kbd "C-M-S-r") (kbd "C-M-R")) => nil

So what?

(equal (kbd "M-S-r")   (kbd "M-R"))   => nil
(equal (kbd "C-M-S-r") (kbd "C-M-R")) => nil

(global-set-key (kbd "C-S-r") 'forward-char)
C-h w forward-char correctly tells us it is on `C-S-r'.

(global-set-key (kbd "C-R")   'backward-char)
C-h w backward-char correctly says it is on `C-r' (not `C-R').

And Control + Shift + `r' moves forward.

All of that is normal.  It is expected, since Control does not distinguish
uppercase and lowercase letters.  Control + Shift + lowercase-letter acts the
same as Control + lowercase-letter.  That is in the nature of Control.

But Meta does distinguish lowercase and uppercase letters.  Meta + Shift +
lowercase-letter does not necessarily act the same as Meta + lowercase-letter.

What is not so expected is this:

(global-set-key (kbd "M-R")   'backward-char)
(global-set-key (kbd "M-S-r") 'forward-char)
C-h w correctly tells us that these are on `M-R' and `M-S-r'.

Press Meta + Shift + `r'.  Point moves backward.

Whether (kbd "M-R") and (kbd "M-S-r") are `equal', and likewise
for `C-', is beside the point.

The point is that (kbd "M-S-r") binds a key that no one can ever type.  The only
recognized external representation for Meta + Shift + `r' is `M-R'.




reply via email to

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