Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Map Mouse Buttons in Config #7982

Closed
Joe-Zer0 opened this issue Aug 17, 2023 · 12 comments
Closed

Map Mouse Buttons in Config #7982

Joe-Zer0 opened this issue Aug 17, 2023 · 12 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@Joe-Zer0
Copy link
Contributor

Joe-Zer0 commented Aug 17, 2023

I would like to propose allowing users to set the mappings for the mouse buttons in the config file. Here is an example:

[mouse.normal.editor]
# right click copies text to system clipboard
mouse2 = ":clipboard-yank"
# something like the following would be useful too
# double-click = "miw"

[mouse.normal.gutter]
# disable setting breakpoints with mouse
mouse1 = "no_op"
@Joe-Zer0 Joe-Zer0 added the C-enhancement Category: Improvements label Aug 17, 2023
@willhansen
Copy link

I've been trying to figure out how to bind middle-click to "gd" and the thumb button to "C-o". Has it just not been implemented as possible yet?

@pascalkuthe
Copy link
Member

no its not implemented yet, its probably reasonable to add some form of remap capability but I see helix as a primarily keyboard driven editor so I see mouse-based mapping as pretty low priority

@Joe-Zer0
Copy link
Contributor Author

That's fair. Thanks for the response!

@tmpm697
Copy link

tmpm697 commented Aug 28, 2023

I aslo have this interest, I want to select text with left mouse and then copy them to system clipboard with right mouse,
or just yank to system clipboard by select text with left mouse.

@kirawi kirawi added E-easy Call for participation: Experience needed to fix: Easy / not much A-helix-term Area: Helix term improvements labels Sep 9, 2023
@0x61nas
Copy link

0x61nas commented Oct 14, 2023

I think that I can work on this, please assign this issue to me if there's no one working on

@Nilsia
Copy link

Nilsia commented Jan 10, 2024

0x61nas I do not know if you implemented this feature yet, however if you are not motivated or don't want to do it anymore.

I would be pleased to take this issue.

I think a bit about it, and I believe that the best way to implement it is to pass into selection mode when double-click / triple-click, or even pressing continuously the left click.
For yanking the solution would be to use the command 'yank' instead of the right click (I do not think that is a good idea to overwrite it, as well as the right click open a menu provided by the OS)

@0x61nas
Copy link

0x61nas commented Jan 10, 2024

however if you are not motivated or don't want to do it anymore

I don't know if I'll have the space to work on this anytime soon

I would be pleased to take this issue.

it's yours now, go ahead

@Joe-Zer0
Copy link
Contributor Author

In Windows Terminal (not in Helix) the right click behavior is to copy to clipboard if there is a selection and the paste if there is no selection. There are no menu's inside the terminal. I think it would be intuitive to mimic this behavior inside of Helix.

@Nilsia
Copy link

Nilsia commented Jan 10, 2024

Yes, that right, when the mouse is enabled, there is no menu.
I will do what I can do and give a try to Windows when finished.

@Joe-Zer0
Copy link
Contributor Author

That would be amazing! Right click yank is my most desired feature.

@Nilsia
Copy link

Nilsia commented Jan 16, 2024

Hi, I have mostly finished the configuration for mouses.
However, something is missing... Is there a way to take from the config key sequences like 'miw' ?
I am searching for that implementations.
If not present, I can implement it by adding in Mappable a KeySequence structure, where the keys start with a '>'.
for example: 2-left = [">m", ">i", ">w"]

@the-mikedavis
Copy link
Member

Is there a way to take from the config key sequences like 'miw' ?

See #1383

@the-mikedavis the-mikedavis linked a pull request Jan 19, 2024 that will close this issue
@the-mikedavis the-mikedavis removed the E-easy Call for participation: Experience needed to fix: Easy / not much label Jan 19, 2024
@helix-editor helix-editor locked and limited conversation to collaborators Apr 14, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10404 Apr 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants