I want to run a function and do different actions based on the next key sequence.
I have this.
(defun ask-for-C-b-or-M-b (key-sequence)
(interactive "KPress Key")
(cond
((seq-set-equal-p key-sequence
[?\C-b]) "C-b pressed")
((seq-set-equal-p key-sequence
[?\M-b]) "M-b pressed")))
(call-interactively 'ask-for-C-b-or-M-b)
This works for C-b
but not for M-b
and I would like to use the kbd function
(kbd "C-b") instead of [?\C-b]
(kbd "M-b") instead of [?\M-b]
I'm trying to get extra keys in a hydra without making a new hydra
(defhydra hydra-test
nil
"test hydra"
("SPC" ask-for-C-b-or-M-b "Do complicated thing"))