how to keep the hydra open whilst scrolling the mouse
I wanted to be able to keep the hydra open whilst moving around in the buffer so have defined the movement keys to the hydra. However, I'm not sure what to do with mouse keys.
I'd like to have mouse clicks and scrolling available so that browsing the buffer with the mouse is possible without affecting the hydra. How can i bind those keys to the hydra?
(defhydra+ e/menu-fn::git-menu ()
("<prior>" scroll-up-command)
("<next>" scroll-down-command)
("<up>" previous-line)
("<left>" left-char)
("<right>" right-char)
("<down>" next-line)
("C-<up>" previous-paragraph)
("C-<down>" next-paragraph)
;;(down-mouse-1 mouse-drag-region)
("<wheel-up>" e/scroll-down-one)
("<wheel-down>" e/scroll-up-one))
okay... now I feel kind of stupid. In this case, setting :exit nil :foreign-keys run to the hydra solves it.
Actually, the :foreign-keys run setting works for all keys. I was hoping to restrict it to just the arrows and the mouse.
A way might be to add those mouse keys to hydra-base-map before defining any hydrae
@bestlem have you tried? does it work?