-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: Implement MiddleClickAutoScroll setting (#171) #239
base: main
Are you sure you want to change the base?
Conversation
Works fine for me on KDE Plasma (X11) but the text in the clipboard is pasted anyway. Not sure if this can be prevented by Vesktop though. Peek.2023-11-16.13-55.mp4 |
I left it out of the description since I thought it would be too long, but I would like to know if I should also put that it still pastes text. Something like: "Enables middle-click scrolling. Text will still be pasted though." |
@D3SOX @Nullmatic can you test the plugin in Vendicated/Vencord#2024 to test if it gets rid of the unwanted pastes? |
Sorry for the late reply. The plugin did limit the number of pastes when enabled on my side at least. It doesn't stop them but makes it harder for it to happen every click so that is a plus. The funny thing I also found when testing is that when enabling native Wayland capabilities using the flag: |
Can you try increasing the reenable delay slider in the plug-in settings? Also check the other setting for when to allow pastes- the text input is selected until you click on another element and by default I still allow pastes when text boxes are selected.
Should be reported to electron? |
For me, when I set the settings to "Whenever a textbox is active" and set reenable delay to 1000ms usually after the first middle-click, the second one will paste into the chat box. The same happens when setting to "Only when clicking on a textbox." I might just be clicking a bit fast for it to register perhaps? As said before though, it works and isn't instantaneous.
Does this only affect electron applications or is this more of a problem with the blink engine? |
Ah! I forgot to clear the reenable timeout function after getting another click. I'll fix that |
When this requires a Vencord plugin anyway, I don't see the need for this anymore as Vendicated/Vencord#2003 exists which does it just as a plugin. Or better yet add the flag via plugin so it only requires the plugin. Alternatively I think what you're doing in the plugin right now could be moved to here under |
Personally, I think the approach of both the desktop setting and plugin is better than the manual feature because
|
I can definitely see your point here now. I haven't ever tried Vencord in a standalone Chromium browser with that flag. |
I was unable to replicate this on Plasma 5, middle click scroll works as normal when launched with native Wayland. |
Still works well on Plasma 6, running both as an xwayland and a wayland client, and no crashes. |
There might be an electron blink launch flag to disable middle click pasting, or you can just disable it system-wide (or best effort) in plasma by going to settings -> General behavior (under workspace0 -> Middle click: Paste selected text (untick) |
Thanks, I did consider doing that but I actually quite like the feature, just anywhere but in an instant messenger, lol =) |
Is this still being considered? This is a very important feature for me. I'd also note that middle-click pasting is still happening even though I have disabled it at OS-level. Webcord and all my other applications respect this, Vesktop is the only one still pasting. |
for now you can add --enable-blink-features=MiddleClickAutoscroll in the launch options, and it works |
For anyone coming across this - this works and also disables middle click pasting. Thanks! |
Which desktop environment do you use? On Plasma, it still pastes when I'm using autoscrolling, but the launch option does work. |
on plasma you need to disable middle-click paste in settings > under workspace - general behavior > Middle click: Pastes selected text |
Ah ok thanks @Haxorzz, same as our previous correspondence in this thread then =) Wonder why this is only an issue in Vesktop and not regular Discord client with an autoscroll plugin. |
For the record, I'm on hyprland and I have the middle click paste option disabled. Even with the option on hyprland disabled though, it would still paste. After using the flag suggested above, it now no longer pastes, but only autoscrolls. Webcord and the regular desktop client do not have this behavior (they autoscroll and don't paste by default). |
@nixRidge @Haxorzz @happenslol can you try my plugin in Vendicated/Vencord#2024 ? not sure how it interacts with that launch flag |
@alchzh Yes, I'd love to, but sorry to ask how do I load this plugin in Vesktop? I understand that Vencord needs to be built with the plugin, but I wasn't able to figure out where to put the relevant index.ts in order to build it with the Vesktop application. |
Build Vencord with the plugin then go to Vesktop Settings in your app and change it to the |
Oh, doy! Thanks so much, I'll give it a shot sometime tonight. |
on gnome, i'm still having it pasting even with middle click paste disabled via dconf settings and and this flag enabled. have been scouring around for a chromium solution to disabling middle click paste, as i'm getting mixed info on whether on wayland middle click paste is implemented by the system or the apps, with many saying it's the apps implementing the feature regardless of system settings (note firefox has a flag to disable this). hope a plugin/solution can be looked at again. |
It's both. There's a system level toggle on Wayland that won't force this behavior like x11 does (which seems broken on gnome, surprise surprise). And there's per-app implementation of autoscroll (and middle click paste), so any app can technically implement it or not implement auto scrolling if they wish |
Resolves #171