feat: Add global shortcuts - #326
Conversation
|
Okay so electron's globalShortcuts api is not at all a good fit for this. the keyup/keydown events are rather crucial for discord's functionality. and also it "consumes" inputs (i have no idea what the correct term for this is. basically if you set anything as a keybind nothing else can use it, for example if you have the tab key as push to talk tab won't do anything everywhere else). |
|
yes. as mentioned in the issue you linked and as discussed on discord, using a native library would be better. however all the current options don't seem to support wayland at all, so we will most likely have to write our own module |
02803f0 to
8d3196c
Compare
|
Could you do a quick write-up of how this works? E.g. is |
|
when you make a new keybind in discord asigns it an id. currently i have the id for each keybind written next to the keybind in the client. |
|
this doesn't seem to work on my setup on ubuntu with i3+x11, unless I still don't get how to use it. not sure if it's just not compatible with my setup or i'm just stupid, but if it doesn't work due to a window manager or display server problem it's something to look into. if i set a toggle mute keybind with an arbitrary key and it gets assigned an id of 3, running |
|
an update seems to have borked it |
|
@klhrt try this commit |
Whenever I run the keybind command, no response in-app and this error pops up. Not sure if the error is responsible/related though. I also don't know if it was happening in the earlier commit as I wasn't running vesktop from a terminal window. for reference this is the resulting printout from the terminal where i run the keybind command: |
|
@klhrt ATM the command is |
and it works! thanks |
|
it would be nice if someone could test this commit on their system. the binary is technically built on nix and idk if that affects anything |
|
Can confirm X11 works! (Arch here) |
|
anyone know how hard it would be to get this to work on Hyprland? |
|
you'd have to implement xdg-desktop-portal's GlobalShortucts api for hyprland on their portal implementation (which they might have implemented already i'm not sure) |
|
Doesn't appear to be working on Hyprland or wayland in general. I can't even start the instance. Here's the full stack trace if that helps: |
|
|
oh none of the wayland support stuff is pushed yet. currently venbind only supports linux x11 |
|
Over the weekend I started writing a C library (based on If anyone is willing to test it around, it'll be greatly appreciated. |
|
As an update for anyone with the PR watched: further work on Venbind has begun to support Windows and Wayland (through xdg-desktop-portal DBus), and is underway. |
|
An alternative to XDP if at all possible may need to be explored at some point for Venbind considering there is currently 3 different (2 confirmed) bugs blocking global shortcuts in KDE and Hyprland, which afaik are the only two actually usable global shortcuts XDP implementations hyprwm/xdg-desktop-portal-hyprland#310 |
|
+1, looking for the keybind |
|
Clearly I'm missing something. How do you register hotkeys in Windows 11 settings? |
you don't, that concept is a linux thing. try just binding to something in discord and see if that works. |
last time i tried this on x11 by accident it didn't work. and i don't think OP has changed anything since then |
|
i don't really understand if this currently works on wayland or not? venbind says it supports wayland now but maybe support needs to be added here too? |
|
Hello. this pull request will not currently work with discord as some of its patches are outdated and need to be fixed. |
|
hearing that they arent interested in merging is actually insane to me |
May I interest you in Equicord? |
almost 2 years... |
|
Well, personally I don’t think it’s that insane. I have a single use case for this, muting my mic in Discord but not anywhere else. Happens … IDK, twice a year? |
|
I use keybinds in Discord probably 5 or 6 times every gaming session, so maybe 6x2 daily, maybe? Depending on the day. Regardless, I can't live without them. I don't think it's the usability aspect that is frustrating here, it's the fact that @tuxinal has spent time implementing it and has created a PR, keeping it up to date with the latest versions of Vesktop for a few years, and the maintainers refuse to even look at merging it. The feature is right here, it's just being ignored, which is astonishing and must be unfathomably frustrating for tuxinal. |
|
I can't imagine it's a widely used feature, no. For what it's worth, I can still apply and use this patch perfectly fine, it still works fine in KDE Plasma. The shortcuts are registered via the DE, and I can use them as normal. Has anyone tried to reach out to the developers to get it merged perhaps? |
|
Do people only use voice activation? I feel like the push to talk users out there are the ones wishing for this feature.
…-------- Original Message --------
On Saturday, 12/27/25 at 08:18 Ridge ***@***.***> wrote:
nixRidge left a comment [(Vencord/Vesktop#326)](#326 (comment))
I can't imagine it's a widely used feature, no.
I don't know what the reason for the project maintainers not merging this is, all I know/assume is they're 1) stretched pretty thin 2) don't have a lot of time.
For what it's worth, I can still apply and use this patch perfectly fine, it still works fine in KDE Plasma. The shortcuts are registered via the DE, and I can use them as normal.
It'd be convenient if it was merged for general users to use, but I wouldn't go as far as to say it's insane that it hasn't been merged yet.
Has anyone tried to reach out to the developers to get it merged perhaps?
—
Reply to this email directly, [view it on GitHub](#326 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AB5I3AY7SZV4SBZYRMQNQ2D4D2WONAVCNFSM6AAAAABBQJPPAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOJUGA3TCNRXGY).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
|
I only use voice activation myself. That's why having a toggle mute button is nice. |
|
Yep, I'm a voice activation guy myself. I run a toggle mute and toggle deafen button, as well as a push to mute button. |
|
I play a lot of games that have built in voice chat, so I often have to mute myself there and then unmute on discord when I need to talk to everyone one Also, I have 4 housemates, so I often need to mute to talk to them if they ask stuff Toggle mute and deafen for me are an absolutely needed feature. I had been using hyprland for a while and therefore has a way to send shortcuts to certain apps, now that I'm back on plasma I don't, this is a needed feature for me |
1 similar comment
|
I play a lot of games that have built in voice chat, so I often have to mute myself there and then unmute on discord when I need to talk to everyone one Also, I have 4 housemates, so I often need to mute to talk to them if they ask stuff Toggle mute and deafen for me are an absolutely needed feature. I had been using hyprland for a while and therefore has a way to send shortcuts to certain apps, now that I'm back on plasma I don't, this is a needed feature for me |
|
I'd like to use push-to-mute for in game VC |
|
I do voice activation too, I need to be able to control whether or not the microphone is currently being used by discord without hitting hardware mute, as other applications may need it. Even if it's currently focused on another monitor, it's often not the focused application, which is why I'd need a feature like this. |
|
I exclusively use push-to-talk, have since the old days of Teamspeak2 and Ventrilo. I would consider push-to-talk to be a critical feature, the absence of it having kept me away from forks of Discord such as Vesktop. |
|
Should venbind be merged into libvesktop for this PR to be mergeable? Will it imply that venbind should be rewrote in C++? |
|
Didn't see this mentioned here: Discord has a setting to make a voice channel push-to-talk ONLY. I had to enable push to talk and add a keybind to speak in that channel, and then I discovered that it only worked while the window was focused, which brought me here. |
|
Something tells me #1238 will be merged instead. Which is lame as Electron's support for global shortcuts on Wayland is an afterthought and until Electron 41 or Electron 42 they weren't even labeled properly electron/electron#49873. |
|
@Damglador and that wouldn't resolve the issue of PTT-only voice channels! The only solution there is just to not use Vesktop for them, I guess. |
|
whats stopping this from being merged? |
|
#326 (comment) from @Ketoro :
#1238 being worked on #326 (comment) from @Damglador :
It seems their API has rather stabilized. It is still better to rely on chromium's native API when possible |
|
Indeed, Chromium's shortcut support on Wayland has really improved now, so it is a viable option and much simpler alternative to this PR. So I have decided to move forward with that instead and plan to finalise and add it in the next version of Vesktop I really appreciate the work that has been done here but in hindsight it was never really realistic for this to be merged. I am (for the most part) the sole maintainer of Vesktop. This pr is a pretty big change that introduces a new native dependency written in Rust, which I'm not well versed with. Hence, this would add a big burden on me as I would have to actually maintain this library going forward. It's out of scope for me, especially considering there's a viable Electron-native alternative now So unfortunately yeah this PR won't be accepted. But thank you a lot again Tuxinal, and I'm sorry for not communicating this more clearly earlier! |


i'm using electron's globalShortcuts api here which doesn't have a way to detect tell the difference between keyup and keydown. this means the push to talk/mute/deafen/etc actions don't really work. we'd probably have to switch to something else at some pointcurrently implementing venbind to use instead of electron's api
resolves #18