I have seen all of the following for defining a keyboard binding. All of these work (at least on MS Windows). I don't know if there is another way to do the same thing.
I am wondering if there is a standard or recommended way to define a keyboard binding and if it is recommended to avoid some of these.
(global-set-key "\M-r" 'some-command)
(global-set-key [(meta r)] 'some-command)
(global-set-key [?\M-r] 'some-command)
(global-set-key (kbd "M-r") 'some-command)
(global-set-key (kbd "M-r") 'some-command)
method because of the consistency in which the key combinations can be defined.. you don't have to remember when or when not to escape stuff. – Kaushal Modi Aug 23 '15 at 22:13