According to the manual,
A Control- modified alphabetical character is always considered case-insensitive: Emacs always treats CA as Ca, CB as Cb, and so on. The reason for this is historical.
Thus, you cannot define them as:
(global-set-key (kbd "Ca") 'xxx) (global-set-key (kbd "CA") 'yyy)
but S- can be used for Shift , therefore:
(global-set-key (kbd "Ca") 'xxx) (global-set-key (kbd "CSa") 'yyy) ;; CA
OK. AND
For all other modifiers, you can make the changed alphabetical characters case sensitive when you configure Emacs. For example, you can force Ma and MA to execute different commands.
So you can define the key binding as follows:
(global-set-key (kbd "Ma") 'xxx) (global-set-key (kbd "MA") 'yyy)
source share