-
Notifications
You must be signed in to change notification settings - Fork 236
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
Added in clicks to keymap. #589
Conversation
Should close #558 |
I think we should probably also introduce the concept of a double and triple click, which would probably clean this up more. Will do that. |
6e4e415
to
55b404f
Compare
I compiled your code and tried adding this to my user module:
It's somehow working, but does not relocate the cursor soon enough to jump to the right definition. It's jumping where the cursor used to be before I perform the keymap. However,
Worked very well. |
I noticed a lot of modules don't follow the convention of actually reporting when they actually do something with user input, so this could be related to something like that. We probably just need to |
Could this be solved by doing first |
I tried this, and it was not good. Basically left click is required to switch between active_views, and active_views consume commands. So if we put keymaps first, and the active view has a left click, you can't switch off that view. I think it does make more sense as-is. |
Even with this current limitation that seem to affect only some plugins, this PR still makes the code better and more powerful. |
8e50853
to
7b5d363
Compare
OK, so added in mouse wheel into this as well (to simplify the scale plugin), and generalized clicks so that there's I think this is good to go. If no one has objections, I'd like to merge this by the 12th. |
I wonder if instead of
|
... That makes way more sense. OK. Will change that. |
…e, 'd' is double, 't' is triple, and no prefix will always take any amount of clicks.
861afd3
to
2931bde
Compare
OK; I've incorporated @takase1121 's suggestions; now we use numeric prefixes (which makes way more sense); as well as allow for both optional click numbers, and optional button specifiers (and renamed x2 to y). I've also added a config variable, I'll merge this by the 16th if no further comments. |
Simple change that just adds the ability to bind click events to commands. This seems like a logical, and "least-surprise" extension to the keymap.
And of course, this is an extension of the current system, so all existing plugins should work fine. And it comes with the bonus that there's no actual real extra lines of code; things are actually decently cleaner this way.