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

Design: global hotkey for push-to-talk #227

Closed
hypevhs opened this issue Nov 8, 2023 · 3 comments
Closed

Design: global hotkey for push-to-talk #227

hypevhs opened this issue Nov 8, 2023 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@hypevhs
Copy link

hypevhs commented Nov 8, 2023

Some backstory:

Wayland by design does not allow an app to listen to hotkeys when you're focused on a different window. So global hotkeys don't work unless configured in KDE (systemsettings kcm_keys).
The official Discord for Linux runs on XWayland, so Discord PTT works only when focused on Discord or any X window.
So this tool was created:
https://github.com/Rush/wayland-push-to-talk-fix/
It directly listens to the uinput device, and uses xdotool to forward any relevant keypresses to X11, where Discord then picks it up, even when Discord window is unfocused.
But, this approach only seems to work for official Discord. It doesn't work for Vesktop. Vesktop does not even try to process hotkeys when unfocused or minimized.

How can we setup a global hotkey for Discord PTT? Can we set up a KDE Configuration Module such that KDE forwards the keys for us, no matter what window is focused?

@hypevhs
Copy link
Author

hypevhs commented Nov 10, 2023

One idea:

  • make a listener process that connects to the org.kde.kglobalaccel DBus.
  • user can now register global shortcuts via KDE systemsettings.
  • when it receives the globalShortcutPressed signal, use a Vencord plugin to run FluxDispatcher.dispatch({ type: "AUDIO_TOGGLE_SELF_MUTE" }) or whatever.
  • that vencord plugin also disables the keybinds menu, and encourages the user to use their system settings.
  • add actions to the .desktop file like how KDE Spectacle does.

@Vendicated
Copy link
Member

vesktop does not have global keybinds at all right now, not even on windows

@hypevhs hypevhs changed the title How to setup a global hotkey for push-to-talk? Design: global hotkey for push-to-talk Nov 10, 2023
@Vendicated
Copy link
Member

#18

@Vendicated Vendicated closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2023
@Vendicated Vendicated added the duplicate This issue or pull request already exists label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants