-
Notifications
You must be signed in to change notification settings - Fork 98
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
Close tab on middle mouse click. #814
base: master
Are you sure you want to change the base?
Close tab on middle mouse click. #814
Conversation
Can this be configurable? middle mouse click is something I accidentally hit a lot, accidentally closing the window would be fairly annoying. |
Thanks for the comment. That's a use-case I have not thought or heard about before. But I do agree that we'd want to avoid that. But I fear making it configurable might not be the right approach here. I think the discoverability of such an option is quite low. We'd definitely have to place that into the cosmic-settings, but even then I fear people struggling with this behaviour might not think that it's configurable. If you want, I'd like to first understand your use-case better:
|
Due to my RSI, I use an ergonomic mouse, in which the "natural" position has my index finger partially resting on the scroll wheel. With the lack of finger dexterity I have on bad days due to the RSI, I can often accidentally trigger it when try to left click. It does occasionally happen when using firefox and chromium, if I was working that day, it would probably happen maybe 1 out of 5-20 times I swap a tab. I don't use tabs on editors enough for this to be an issue on them. It's not a major issue in something like a browser since I can just re-open the tab with a hotkey (which I have bound on separate pad), and most of the sites I use load fast on my PC. I typically keep my telecoms apps like telegram, matrix, discord, and slack in a stack. I wouldn't loose work or anything, it would be at most a minor inconvenience. at the very least, I haven't heard of other people having issues with this like I have anyways. I'm not sure if discoverability would be a major issue. I for sure see the benefit in having the feature. |
Thanks for the detailed response. I totally agree that this is a problem we should address. Accessibility is really important Imo. Sadly I don't have a lot of experience in that field. In this case it really seems like the most pragmatic option. I can definitely implement such a config option. I'll check later in the code which options are available. I could see either a simple toggle or adjustable key-bindings work well for this. What do you think would be the better option? |
I'm not sure if the maintainers already have a concept for accessibility in mind, where we could hook into. Either for discoverability or documentation. |
@Drakulix Sorry for pinging you. I think for the config options we need some input/feedback from a maintainer... I'm more than happy to implement this, both here and in cosmic-settings, but I wanna make sure first that we are going in the right direction. |
I think in general close-on-middle-click as a feature is desirable. I agree, that being able to disable this should be an accessibility feature though. So what we want to have in cosmic-comp is a setting in For the cosmic-settings side, I cannot give you much guidance. We have plans for accessibility settings and some very early design, I reckon, but nothing really where you can just add this. So I am inclined to say we can leave this a config-file only setting for now, but any implementation that is merged should have a way to toggle it. |
The design is not ready yet for the Accessibility settings so leaving it in the config only for now sounds good to me. |
248fccd
to
4ec9908
Compare
@Drakulix Sorry it took me a while. Now it is configurable and the configuration will be updated live whenever the file changes. |
4ec9908
to
9a66d8c
Compare
I just noticed that I did one change only locally through go-to-definition... iced_runtime would need a change for that to work... I need to investigate how else I can propagate config changes to the windows then. |
Implements #812.
Allows to close a tab in a window stack with a middle mouse click. Dispatch a close Message on middle mouse click, the rest was already implemented.
I'm sorry this is my first PR in this repo and I'm not sure about the protocol for this here. If anything is missing, please let me know.