I have M-x (and also my menu key) mapped to the command helm-M-x.
How to write an elisp function or how to configure emacs so that M-x (and the menu key) performs as C-g when the minibuffer is open.
the goal is then to make M-x (and the menu key) a toggle on/off feature.