Linux Apps PTT

e_playssss

Member
Joined
Jun 1, 2023
Messages
64
Reaction score
0
Credits
381
So I have discord and TS3 installed with linux and I have it setup to push to talk. So when I have the application open I can use ptt but when I close the application to go to another application I can't use ptt for either. How can I fix that.
 


So I have discord and TS3 installed with linux and I have it setup to push to talk. So when I have the application open I can use ptt but when I close the application to go to another application I can't use ptt for either. How can I fix that.
It sounds like the keybind for the push-to-talk is being tied up by the closed application, making it unusable for the other applications. One solution would be to use a keybinding manager, like Xbindkeys or sxhkd, to set up custom keybindings that will work regardless of the active application. Another solution would be to modify the keybinding settings for each application so they do not conflict with each other. I would recommend researching keybinding managers or reaching out to the support communities for Discord and TS3 for guidance on how to modify the keybindings.
 
It sounds like the keybind for the push-to-talk is being tied up by the closed application, making it unusable for the other applications. One solution would be to use a keybinding manager, like Xbindkeys or sxhkd, to set up custom keybindings that will work regardless of the active application. Another solution would be to modify the keybinding settings for each application so they do not conflict with each other. I would recommend researching keybinding managers or reaching out to the support communities for Discord and TS3 for guidance on how to modify the keybindings.
Is there a specific website to download Xbindkeys. Im using debian 11
 
Is there a specific website to download Xbindkeys
Xbindkeys is often available in the repositories of most Linux distributions, which makes it easy to install directly from the terminal using the distribution's package manager.

For example, if you're using Ubuntu, you can install Xbindkeys by opening a terminal and running the command:

Code:
sudo apt-get install xbindkeys

If you're using another distribution, the command to install Xbindkeys may be different, but it should be available through your distribution's package manager.

Alternatively, you can visit the Xbindkeys GitHub page (https://github.com/jordansissel/xbindkeys) to get the latest version of the source code, which you can compile and install on your system.
 
Xbindkeys is often available in the repositories of most Linux distributions, which makes it easy to install directly from the terminal using the distribution's package manager.

For example, if you're using Ubuntu, you can install Xbindkeys by opening a terminal and running the command:

Code:
sudo apt-get install xbindkeys

If you're using another distribution, the command to install Xbindkeys may be different, but it should be available through your distribution's package manager.

Alternatively, you can visit the Xbindkeys GitHub page (https://github.com/jordansissel/xbindkeys) to get the latest version of the source code, which you can compile and install on your system.
Ok 2 more question's and i'm done. How do I open the config file to set it up? Along with what do I put the PTT to make it useable?
 
Ok 2 more question's and i'm done. How do I open the config file to set it up? Along with what do I put the PTT to make it useable?
To open Xbindkeys' configuration file, you can run the command xbindkeys --defaults > ~/.xbindkeysrc in the terminal. This will create a default configuration file in your home folder. You can then use a text editor, like nano or vim, to edit the configuration file and set up your custom keybindings.

In the configuration file, you will need to specify which key(s) you want to use as your push-to-talk button(s), and what command(s) they should trigger when pressed.

For example, if you want to use the left control key as your push-to-talk button, you would add the following line to your ~/.xbindkeysrc file:

Code:
"pactl set-source-mute 1 toggle"
Control_L

This example uses the pactl command to toggle the mute status of the system's default microphone when the left control key is pressed. You can replace this command with the command(s) required by your specific applications to activate push-to-talk.

After saving changes to your configuration file, you can apply them by running the command xbindkeys -p in the terminal.
 
To open Xbindkeys' configuration file, you can run the command xbindkeys --defaults > ~/.xbindkeysrc in the terminal. This will create a default configuration file in your home folder. You can then use a text editor, like nano or vim, to edit the configuration file and set up your custom keybindings.

In the configuration file, you will need to specify which key(s) you want to use as your push-to-talk button(s), and what command(s) they should trigger when pressed.

For example, if you want to use the left control key as your push-to-talk button, you would add the following line to your ~/.xbindkeysrc file:

Code:
"pactl set-source-mute 1 toggle"
Control_L

This example uses the pactl command to toggle the mute status of the system's default microphone when the left control key is pressed. You can replace this command with the command(s) required by your specific applications to activate push-to-talk.

After saving changes to your configuration file, you can apply them by running the command xbindkeys -p in the terminal.
Screenshot 2023-06-01 13.15.10.png

I typed the command in but the config file doesn't show..
 
View attachment 15892
I typed the command in but the config file doesn't show..
The xbindkeys --defaults > ~/.xbindkeysrc command should have created a default configuration file named .xbindkeysrc in your home directory (/home/username/.xbindkeysrc). If the file isn't there, you can check if it was created in another directory by running the command find / -name ".xbindkeysrc".

Alternatively, you can create the .xbindkeysrc file manually by running the command touch ~/.xbindkeysrc and then use a text editor, like nano or vim, to edit the file and add your custom keybindings.

If you continue to have trouble with Xbindkeys, you may want to consider using an alternative keybinding manager, like sxhkd, which is lightweight and easy to set up.
 
The xbindkeys --defaults > ~/.xbindkeysrc command should have created a default configuration file named .xbindkeysrc in your home directory (/home/username/.xbindkeysrc). If the file isn't there, you can check if it was created in another directory by running the command find / -name ".xbindkeysrc".

Alternatively, you can create the .xbindkeysrc file manually by running the command touch ~/.xbindkeysrc and then use a text editor, like nano or vim, to edit the file and add your custom keybindings.

If you continue to have trouble with Xbindkeys, you may want to consider using an alternative keybinding manager, like sxhkd, which is lightweight and easy to set up.
So I couldn't get anywhere with Xbindkeys so I just went to sxhkd and I used the code vim .config/sxhkd/sxhkdrc but nothing pops up just a whole lot of tilde's
Screenshot 2023-06-01 13.33.10.png
 
So I couldn't get anywhere with Xbindkeys so I just went to sxhkd and I used the code [lCODE]vim .config/sxhkd/sxhkdrc[/lCODE] but nothing pops up just a whole lot of tilde's View attachment 15893
It looks like the syntax for opening the configuration file for sxhkd was incorrect. The correct syntax for opening the configuration file for sxhkd would be nano ~/.config/sxhkd/sxhkdrc or vim ~/.config/sxhkd/sxhkdrc.

This command opens the configuration file for sxhkd, which is located at ~/.config/sxhkd/sxhkdrc, in either the nano or vim text editor.

I hope this helps! Let me know if you have any other questions.
 
It looks like the syntax for opening the configuration file for sxhkd was incorrect. The correct syntax for opening the configuration file for sxhkd would be nano ~/.config/sxhkd/sxhkdrc or vim ~/.config/sxhkd/sxhkdrc.

This command opens the configuration file for sxhkd, which is located at ~/.config/sxhkd/sxhkdrc, in either the nano or vim text editor.

I hope this helps! Let me know if you have any other questions.
Did I install it wrong because I tried with the nano command and the vim command and the vim command gave me the same thing just a bunch of tilde's and the nano command to opened up a blank nano terminal
 
Did I install it wrong because I tried with the nano command and the vim command and the vim command gave me the same thing just a bunch of tilde's and the nano command to opened up a blank nano terminal
It is possible that you may not have created the configuration file for sxhkd yet. To create the configuration file for sxhkd, you can run the following command:

Code:
touch ~/.config/sxhkd/sxhkdrc

This command creates a new file named sxhkdrc in the ~/.config/sxhkd directory. You can then open this file in a text editor like vim or nano to add your keybindings.

You can also check if the configuration file already exists by running the command:

Code:
ls ~/.config/sxhkd

This will show you all the files that already exist in the ~/.config/sxhkd directory.

I hope this helps! Let me know if you have any other questions.
 
It is possible that you may not have created the configuration file for sxhkd yet. To create the configuration file for sxhkd, you can run the following command:

Code:
touch ~/.config/sxhkd/sxhkdrc

This command creates a new file named sxhkdrc in the ~/.config/sxhkd directory. You can then open this file in a text editor like vim or nano to add your keybindings.

You can also check if the configuration file already exists by running the command:

Code:
ls ~/.config/sxhkd

This will show you all the files that already exist in the ~/.config/sxhkd directory.

I hope this helps! Let me know if you have any other questions.
So is this the correct pathway for my nano terminal
Screenshot 2023-06-01 13.43.42.png
 
So is this the correct pathway for my nano terminal
View attachment 15894
Yes, the pathway ~/.config/sxhkd/sxhkdrc should be correct for opening the configuration file for sxhkd in nano. When you open it with nano, you should see a blank file where you can add your custom keybindings.

Here's an example of a keybinding that toggles the mute status of the default microphone:

Code:
#Toggle mute/unmute of the default microphone
Ctrl + Shift + m
    pactl set-source-mute @DEFAULT_SOURCE@ toggle

In this example, the keybinding is set to Ctrl + Shift + m and the command to toggle the mute status of the default microphone is pactl set-source-mute @DEFAULT_SOURCE@ toggle.

Remember to save the changes you make to the sxhkdrc configuration file and apply them by restarting sxhkd or typing the command pkill -USR1 -x sxhkd in the terminal.

Let me know if you have any other questions or issues!
 
Yes, the pathway ~/.config/sxhkd/sxhkdrc should be correct for opening the configuration file for sxhkd in nano. When you open it with nano, you should see a blank file where you can add your custom keybindings.

Here's an example of a keybinding that toggles the mute status of the default microphone:

Code:
#Toggle mute/unmute of the default microphone
Ctrl + Shift + m
    pactl set-source-mute @DEFAULT_SOURCE@ toggle

In this example, the keybinding is set to Ctrl + Shift + m and the command to toggle the mute status of the default microphone is pactl set-source-mute @DEFAULT_SOURCE@ toggle.

Remember to save the changes you make to the sxhkdrc configuration file and apply them by restarting sxhkd or typing the command pkill -USR1 -x sxhkd in the terminal.

Let me know if you have any other questions or issues!
So the command
"#Toggle mute/unmute of the default microphone

Ctrl + Shift + m

pactl set-source-mute @DEFAULT_SOURCE@ toggle"
Is it universal? Meaning that does it unmute my microphone on all applications or just one?
If so how do I change it to work for to separate discord and teamspeak separately because I need to different keys for both application?
My command key for discord push to talk is "Control_R"
My command key for Teamspeak push to talk is "Alt_R"
 
So the command
"#Toggle mute/unmute of the default microphone

Ctrl + Shift + m

pactl set-source-mute @DEFAULT_SOURCE@ toggle"
Is it universal? Meaning that does it unmute my microphone on all applications or just one?
If so how do I change it to work for to separate discord and teamspeak separately because I need to different keys for both application?
My command key for discord push to talk is "Control_R"
My command key for Teamspeak push to talk is "Alt_R"
The command to toggle mute/unmute the default microphone using sxhkd is applied at the system level, which means it will affect the default microphone used by all applications.

If you want to use different keybindings for setting push-to-talk in Discord and Teamspeak, you can create separate keybindings for each application in the sxhkdrc configuration file by using the --class flag to specify the name of the application window.

Here's an example of a keybinding that sets push-to-talk in Discord when the Control_R key is pressed:

Code:
#Push-to-talk in Discord
ctrl + Control_R
    xdotool search --class discord keydown Shift+Control_R
ctrl + Control_R + Release
    xdotool search --class discord keyup Shift+Control_R

In this example, the xdotool command simulates a key press or release event in a specific application window by using the search option to locate the window by class name.

You can use a similar configuration for Teamspeak by replacing the class name discord with the class name of the Teamspeak window. You can find the class name of a window by running the xprop command and clicking on the window you want to target.

Keep in mind that Discord and Teamspeak may use different key definitions for push-to-talk, so you'll need to check their settings to confirm which key(s) to use.
 
The command to toggle mute/unmute the default microphone using sxhkd is applied at the system level, which means it will affect the default microphone used by all applications.

If you want to use different keybindings for setting push-to-talk in Discord and Teamspeak, you can create separate keybindings for each application in the sxhkdrc configuration file by using the --class flag to specify the name of the application window.

Here's an example of a keybinding that sets push-to-talk in Discord when the Control_R key is pressed:

Code:
#Push-to-talk in Discord
ctrl + Control_R
    xdotool search --class discord keydown Shift+Control_R
ctrl + Control_R + Release
    xdotool search --class discord keyup Shift+Control_R

In this example, the xdotool command simulates a key press or release event in a specific application window by using the search option to locate the window by class name.

You can use a similar configuration for Teamspeak by replacing the class name discord with the class name of the Teamspeak window. You can find the class name of a window by running the xprop command and clicking on the window you want to target.

Keep in mind that Discord and Teamspeak may use different key definitions for push-to-talk, so you'll need to check their settings to confirm which key(s) to use.
So for your command it has ctrl+ Control_R i'm just using Control_R do I put just Control_R or do I put what you put same with the comand Shift+Control_R I'm only using Control_R do I put the Shift in there?
 
So for your command it has ctrl+ Control_R i'm just using Control_R do I put just Control_R or do I put what you put same with the comand Shift+Control_R I'm only using Control_R do I put the Shift in there?
You can modify the keybinding in the sxhkdrc file according to your requirements. If you want to use only the Control_R key as your push-to-talk key, you can use the following configuration:

Code:
#Push-to-talk in Discord using Control_R
ctrl + Control_R
    xdotool search --class discord keydown Control_R
ctrl + Control_R + Release
    xdotool search --class discord keyup Control_R

In this configuration, the Control_R key is used for both keydown and keyup events, so you don't need to use the Shift key.

Similarly, if you want to use the Alt_R key for push-to-talk in Teamspeak, you can modify the configuration as follows:

Code:
#Push-to-talk in Teamspeak using Alt_R
ctrl + Alt_R
    xdotool search --class teamspeak keydown Alt_R
ctrl + Alt_R + Release
    xdotool search --class teamspeak keyup Alt_R

In this configuration, the Alt_R key is used for both keydown and keyup events.

However, keep in mind that the actual keybinding settings for push-to-talk in Discord and Teamspeak might use a combination of keys, so you should check their settings to confirm which keys to use for push-to-talk.
 
So is this how I write the command for discord
Yes, you can use the following configuration to set push-to-talk in Discord using the Control_R key:

Code:
#Push-to-talk in Discord using Control_R
ctrl + Control_R
    xdotool search --class discord keydown Control_R
ctrl + Control_R + Release
    xdotool search --class discord keyup Control_R

This configuration binds the Control_R key to both keydown and keyup events for the push-to-talk keybinding in Discord.

Remember to save the changes you make to the ~/.config/sxhkd/sxhkdrc file and apply them by restarting sxhkd or typing the command pkill -USR1 -x sxhkd in the terminal.

I hope this works for you! Let me know if you have any other questions.
 

Members online


Latest posts

Top