-
-
Notifications
You must be signed in to change notification settings - Fork 193
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: Add global shortcuts #326
base: main
Are you sure you want to change the base?
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 |
convert id to number enable desktop only shortcut actions
Co-Authored-By: exhq <[email protected]>
TEMPORARY: show keybind ID in the keybind page
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 comment was marked as spam.
This comment was marked as spam.
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 |
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