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

Adding bindings for mouse buttons #1033

Closed
lazarcf opened this issue Sep 27, 2018 · 7 comments
Closed

Adding bindings for mouse buttons #1033

lazarcf opened this issue Sep 27, 2018 · 7 comments

Comments

@lazarcf
Copy link

lazarcf commented Sep 27, 2018

Hey,

I would very much appreciate it if I could change the middle / right click mouse button behaviour, for instance make them paste from clipboard.

@kovidgoyal
Copy link
Owner

I'm afraid this is not something I am interested in, patches are welcome. And note that middle click already pastes, from primary selection, on platforms that have a primary selection.

@lazarcf
Copy link
Author

lazarcf commented Sep 27, 2018

The problem is I select something in one kitty terminal and can't middle-click paste it on another..

@maximbaz
Copy link
Contributor

The problem is I select something in one kitty terminal and can't middle-click paste it on another..

Works for me. Are you saying that middle click works in the same kitty instance, but not in a different one?

@somody
Copy link

somody commented Jan 21, 2020

I'm interested in this feature for another usecase. Buttons 8 and 9 on my external mouse are generally understood by software as back and forward commands, respectively. Right now, these buttons are useless in kitty, but it would be nice to map them to previous_tab and next_tab, respectively. Although the mouse buttons could be mapped to keyboard shortcuts, and then these keyboard shortcuts could be used with kitty, this would break the current functionality of the mouse buttons with Chrome, etc.

@kovidgoyal
Copy link
Owner

Mouse button mapping was implemented in 0.21.0

@tjatjagithub
Copy link

This seems to work:

focus_follows_mouse yes

# Do not handle URLs
mouse_map left click ungrabbed no-op
detect_urls no
allow_hyperlinks no

#copy_on_select clipboard
copy_on_select yes

strip_trailing_spaces smart
select_by_word_characters ${}/&@_.

#mouse_map right press grabbed,ungrabbed paste_from_clipboard
mouse_map right press grabbed,ungrabbed paste_from_selection

Not sure why "yes" works for the clipboard.
And not sure what is the difference between paste_from_clipboard and paste_from_selection - both seem to work the same.

And, I cannot copy the "newline" of a line with a tripple-click.

@tjatjagithub
Copy link

Alacritty is going to add support for right-click paste!
If that allows to copy the whole line including the newline character, that's what I need :-)

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

5 participants