-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Key remappings for mouse configuration #9469
base: master
Are you sure you want to change the base?
Conversation
mouse_keys::MIDDLE => MouseEventKind::Down(MouseButton::Middle), | ||
mouse_keys::RIGHT => MouseEventKind::Down(MouseButton::Right), | ||
mouse_keys::SCROLL_DOWN => MouseEventKind::ScrollDown, | ||
mouse_keys::SCROLL_UP => MouseEventKind::ScrollUp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot left and right scroll here
Looks like only a dozen or so commands are available for mapping to mouse events, suffixed with |
} | ||
|
||
fn scroll_mouse_impl(cx: &mut Context, evt: &MouseEvent, dir: Direction, _: &mut EditorView) { | ||
let current_view = cx.editor.tree.focus; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if a picker has the focus?
currently the mouse wheel does not scroll the code preview in the picker, but the code in the current buffer.
I am trying to concatenate both STATIC_COMMANDS list through a macros without repeating everything, however, the macro does not seem nice. |
I have pushed a new macro which generate the commands, avoiding repetition of code when generation them. However there are some things that I do not really like :
I have not handled yet the current buffer focus. |
Feature: from the configuration file, it is now possible to map mouse buttons on some helix functionality.
Code:
Added new simple structures for Mousemaps,
and cloned only few key maps functions into mouse functions, do not hesitate if more are required.
Updated / Added tests for mouses in configuration.
This is a pull request for this issue : #7982