This question already has an answer here:
kbd doesn't work for all desired input. For example, this results in an error:
(kbd "C-H-left") edmacro-parse-keys: C-H- must prefix a single character, not left
and should be written as:
There is an alternative (vector) syntax:
but this representation also isn't unique: the vector above has the same meaning as
[(control hyper x) home]
(kbd "RET") isn't
?\C-m. Same with
(kbd "DEL") and others.
(kbd "\e\eq") and
[?\e \?M-q] represent the same key sequence, but have different values:
(kbd "\e\eq") ; evaluated to "^[^[q" [?\e \?M-q] ; evaluated to [27 134217841]
Are all these syntax rules available in Emacs >= v22.x?
Which syntax is consistent and regular? Which mini-language describing key sequences has fewer special cases?
I found that I need to consult references every time I make a new key binding. Consider binding
ESC M-H-kp-2 C-PgUp or similar.