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

middle click sends bacon to outer heaven #298

Open
egasimus opened this issue Jan 13, 2025 · 6 comments · May be fixed by #302
Open

middle click sends bacon to outer heaven #298

egasimus opened this issue Jan 13, 2025 · 6 comments · May be fixed by #302
Labels
bug Something isn't working

Comments

@egasimus
Copy link

bacon 3.7.0
in tmux 3.5a
in kitty 0.38.1

action taken: click the middle mouse button

expected result: nothing happens

actual result: bacon cycles through the available job types several times like some sort of wheel of fortune, before stopping on the test job, which it then executes.

is this intended behavior?

@Canop
Copy link
Owner

Canop commented Jan 14, 2025

is this intended behavior?

No. I'll have a look.

@Canop Canop added the bug Something isn't working label Jan 14, 2025
@Canop
Copy link
Owner

Canop commented Jan 15, 2025

Ok, so, this may look familiar to terminal users: the events received by bacon on middle click are... the keys matching the text content of the clipboard...

@Canop
Copy link
Owner

Canop commented Jan 15, 2025

I'll have to capture mouse events (and then handle the mouse wheel) to fix this.

Canop added a commit that referenced this issue Jan 15, 2025
This makes bacon handle mouse events.

Downsides:
- potential regression for users pasting with middle click
- major regression for users selecting and copying with the mouse
- not using the scroll multiplier defined OS wide

Fix #298
@Canop Canop linked a pull request Jan 15, 2025 that will close this issue
@Canop
Copy link
Owner

Canop commented Jan 15, 2025

See #302

It's not so trivial to fix as I don't think I can recognize a middle-click without intercepting mouse events.

Another path I could try is discarding key events sent at the same time, but it wouldn't work when the clipboard contains only one event.

Other ideas welcome.

@Stargateur
Copy link
Contributor

it's not something bacon should handle, it's related to terminal feature of copy paste and is the intended behavior. Every terminal app will do this.

@c-git
Copy link
Contributor

c-git commented Jan 16, 2025

Yeah I don't think bacon should try to handle this. I actually think I'd be more surprised if it did handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants