In helm, when you press TAB
, you have access to the actions corresponding to the current entry. By default, they are bound to [F1]
,[F2]
... But I don't like these shortcuts for several reasons:
- the
F{n}
keys are not easy to access on a keyboard - if you have more than 12 entries, then you don't have any keybinding for them
- it's hard to associate any mnemonic with
F{n}
keys
So here is my question: how could I change the shortcuts of an helm action? I'm interested both when I wrote my own code, but also if possible to change them globally.
Here is a MWE:
(helm :sources (helm-build-sync-source "Animal"
:candidates '("Duck" "Elephant" "Lion")
:action '(("Say hello!" . (lambda (req)
(message (concat "Hello" req))))
("Say bye!" . (lambda (req)
(message (concat "Bye " req))))
("Eat" . (lambda (req)
(message (concat "No, we don't eat " req "!")))))
:fuzzy-match t)
:buffer "*helm test*")