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

Added DBus calls to activate and deactivate push to talk #3675

Merged
merged 1 commit into from
Sep 26, 2019
Merged

Added DBus calls to activate and deactivate push to talk #3675

merged 1 commit into from
Sep 26, 2019

Conversation

robozman
Copy link
Contributor

This code is from part of the solution for push to talk support on Wayland presented by @detrout in #3243.

This PR:

  • Adds startTalking and stopTalking DBus calls to allow triggering push to talk

This change coupled with a binding (example for sway below) allows usage of push to talk on Wayland. Gnome, Plasma, and Sway all seem to support triggering arbitrary shell commands with a hotkey. Due to the lack of a Wayland protocol for keyboard shortcut registration this seems to be a good workaround.

bindsym --whole-window button9 exec dbus-send --session --type=method_call --dest=net.sourceforge.mumble.mumble / net.sourceforge.mumble.Mumble.startTalking                                                     
bindsym --whole-window --release button9 exec dbus-send --session --type=method_call --dest=net.sourceforge.mumble.mumble / net.sourceforge.mumble.Mumble.stopTalking 

@davidebeatrici davidebeatrici added this to the 1.4.0 milestone Apr 24, 2019
@davidebeatrici
Copy link
Member

Could you squash the two commits, please?

@davidebeatrici davidebeatrici merged commit a07bb2f into mumble-voip:master Sep 26, 2019
@davidebeatrici
Copy link
Member

Thank you very much for your contribution!

@robozman
Copy link
Contributor Author

You're welcome. Thanks a bunch for your help both getting this merged and with understanding the codebase!

@davidebeatrici
Copy link
Member

You're welcome!

@Krzmbrzl Krzmbrzl mentioned this pull request May 19, 2020
cortiv added a commit to cortiv/mumble that referenced this pull request Feb 13, 2021
…rface

If mumble isn't allowed to listen to all input from an input device, for example when running as wayland client, ptt events can be sent via socket rpc, and, in the case of wayland, the keybinding can be done by the compositor. mumble-voip#3675 implements this for dbus.
To avoid executing the rather large mumble binary to do the rpc, one could also do something like this:
echo '<self><starttalking>starttalking</starttalking></self>' | socat - UNIX-CONNECT:/tmp/MumbleSocket

Implements mumble-voip#1594
@ghost
Copy link

ghost commented Nov 24, 2021

Is it possible to do this with a regular key instead of a mouse button?
When i replace "button9" with something like "$mod+u", it tells me that it does not know that button.
It does kinda work when i remove "--whole-window", but after that it just hangs with "StartTalking"

@robozman
Copy link
Contributor Author

@aconitumnapellus Yeah, I think the --whole-window option really only applies to mouse buttons so I'm not surprised that it doesn't support passing keyboard input.

With regard to it getting stuck in the on state, I just played around with it and was able to reproduce that inconsistently locally. I'm not really sure what the root issue there is. It really could be anything from an issue in Sway, dbus, or Mumble. I would suggest you open a separate issue to discuss it getting stuck. I wonder if it is related to this issue: #4154. Seems like the problem might be somewhere in the middle of the chain though, I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants