Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to keep the hydra open whilst scrolling the mouse #390

Open
zcaudate opened this issue Dec 18, 2020 · 4 comments
Open

how to keep the hydra open whilst scrolling the mouse #390

zcaudate opened this issue Dec 18, 2020 · 4 comments

Comments

@zcaudate
Copy link

zcaudate commented Dec 18, 2020

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))
@zcaudate
Copy link
Author

okay... now I feel kind of stupid. In this case, setting :exit nil :foreign-keys run to the hydra solves it.

@zcaudate
Copy link
Author

Actually, the :foreign-keys run setting works for all keys. I was hoping to restrict it to just the arrows and the mouse.

@zcaudate zcaudate reopened this Dec 18, 2020
@bestlem
Copy link

bestlem commented Jun 19, 2022

A way might be to add those mouse keys to hydra-base-map before defining any hydrae

@zcaudate
Copy link
Author

@bestlem have you tried? does it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants