Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Input - Mouse: Add support for right & middle mouse buttons #1

Closed
bryphe opened this issue Nov 24, 2016 · 5 comments
Closed

Input - Mouse: Add support for right & middle mouse buttons #1

bryphe opened this issue Nov 24, 2016 · 5 comments

Comments

@bryphe
Copy link
Member

bryphe commented Nov 24, 2016

All mouse clicks are currently interpreted as left mouse clicks - updating the app to recognize middle / right would be helpful.

@bryphe
Copy link
Member Author

bryphe commented Nov 24, 2016

Also need to look at handling modifir keys - control, alt, shift

@Bretley
Copy link
Contributor

Bretley commented Dec 6, 2016

@extr0py I'm kind of an idiot to JS/TS, but if you could point me to some resources that would help me specifically understand the overview of the events and how they interact with the neovim instance (besides me combing the source) I could probably get some of these easier ones done :)

@Bretley
Copy link
Contributor

Bretley commented Dec 7, 2016

Just to get started, is the UI going to hijack the right/middle click? It seems like neovim uses them for little to nothing, and most people's terminals already intercept them.

@bryphe
Copy link
Member Author

bryphe commented Dec 8, 2016

@bert88sta - thanks for the PR for scrolling! Sorry that I was slow to reply to this thread. Looks like you have a pretty good grasp on the mouse events in Input/Mouse.ts, so that's great - that and Input/Keyboard.ts is where most of the action is.

The Mozilla docs are a really good reference for the general mouse events: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
but seems like you already got the info on the scroll / delta to implement it.

Regarding middle/right click, I think you're right, it should be safe to intercept them. I don't remember ever using right/middle click with GVIM. Right-click might be nice to show a context menu at some point, but the scrolling is the most important functionality at the moment - thanks again for implementing it!

@bryphe
Copy link
Member Author

bryphe commented Dec 8, 2016

I'll close this since the most important case is addressed with #45, but if there is other mouse related functionality you'd like to explore we can open a new issue or re-open this.

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

No branches or pull requests

2 participants