Skip to content

Instantly share code, notes, and snippets.

@SavageCore
Last active February 20, 2026 04:09
Show Gist options
  • Select an option

  • Save SavageCore/5dc17e04d6b563d19698889ce3e3f9ee to your computer and use it in GitHub Desktop.

Select an option

Save SavageCore/5dc17e04d6b563d19698889ce3e3f9ee to your computer and use it in GitHub Desktop.

Fixing Push to Talk on Wayland / KDE Plasma

Tested on Nobara 43. Should work on any KDE Plasma / Wayland distro with XWayland installed.

Jump to: TeamSpeak 3 | TeamSpeak 6 | Discord

Background

Wayland does not allow applications to capture global keyboard input when not in focus - this is an intentional security feature to prevent keylogging. This breaks push-to-talk in voice chat apps like TeamSpeak 6 and Discord on a native Wayland session.

The solution is to run the app under XWayland instead of native Wayland. Global hotkeys then work natively as you'd expect. If you want to use a mouse side button for PTT, keyd is also needed to remap it to a keyboard key the app can bind to - see Part 3: Bind a mouse side button.

TeamSpeak 3

Prefer the classic TS3 over the Discord-like TS6? The Flatpak version already has Wayland disabled by default so no Flatseal changes are needed - just install and go:

flatpak install --user flathub com.teamspeak.TeamSpeak3

If you want a mouse side button for PTT, skip straight to Part 3: Bind a mouse side button and bind your key in TS3's Tools → Options → Capture → Push-to-Talk.

Part 1: Install TeamSpeak 6

TeamSpeak 6 can be installed either via the official 64-bit Linux tar.gz or via Flatpak - both work with this guide.

Option A: tar.gz

cd ~/Downloads
wget https://files.teamspeak-services.com/pre_releases/client/6.0.0-beta3.4/teamspeak-client.tar.gz
tar -xzf teamspeak-client.tar.gz

A good place to keep self-contained app folders like this is ~/.local/opt/ - the user-level equivalent of /opt/:

mkdir -p ~/.local/opt
mv teamspeak-client ~/.local/opt/teamspeak-client

Running the binary for the first time will create the .desktop file in ~/.local/share/applications/ automatically, making TS6 appear in your application launcher:

~/.local/opt/teamspeak-client/TeamSpeak

You can close it again once it has launched successfully.

Important: If you ever move the teamspeak-client folder, delete the .desktop file next to the binary and re-run it from the new location - TS6 will recreate the .desktop in ~/.local/share/applications/ with the correct path automatically:

rm /new/path/to/teamspeak-client/teamspeak-client.desktop
/new/path/to/teamspeak-client/TeamSpeak

Option B: Flatpak

flatpak install --user flathub com.teamspeak.TeamSpeak

Then install Flatseal if you don't already have it - it's a GUI for managing Flatpak permissions:

flatpak install --user flathub com.github.tchx84.Flatseal

Open Flatseal, select TeamSpeak from the app list, scroll to Socket, and disable Wayland windowing system. This forces TS6 into XWayland mode and is the Flatpak equivalent of the .desktop edit in the next section - skip that step if you're using Flatpak.

tar.gz vs Flatpak - which should I use?

tar.gz Flatpak
Updates In-app, like Windows Via Discover / Flathub / flatpak update
Install size ~450MB ~5MB + ~630MB runtime if not already present, though runtime is shared with other Flatpak apps
Sandbox No - runs as your user Yes - some permissions restricted by default
XWayland setup Edit .desktop file Toggle in Flatseal

Both work equally well for this guide. Flatpak is the easier ongoing experience if you already use it for other apps. The tar.gz gives you a more direct install with in-app update prompts.

Autostart TeamSpeak 6

TeamSpeak doesn't have a built-in startup option. To autostart it with KDE Plasma, copy its .desktop file to the autostart folder:

cp ~/.local/share/applications/teamspeak-client.desktop ~/.config/autostart/teamspeak-client.desktop

Part 2: Force TeamSpeak 6 into XWayland mode (tar.gz only)

Flatpak users: skip this section - you already did this via Flatseal in Part 1.

Edit the TS6 desktop entry:

nano ~/.local/share/applications/teamspeak-client.desktop

Find the Exec= line and add --ozone-platform-hint=x11 to it:

Exec=/home/YOUR_USERNAME/.local/opt/teamspeak-client/TeamSpeak %u --ozone-platform-hint=x11

Save and relaunch TS6. You can now bind hotkeys directly in Settings → Hotkeys and they will work globally.

Part 3: Bind a mouse side button (optional)

TS6's hotkey binding dialog only accepts keyboard input - clicking a mouse button does nothing. If you want to use a mouse side button for PTT, use keyd to remap it to a spare keyboard key that TS6 can then bind to.

Build keyd from source

keyd is not yet in most distro repos:

cd ~/Downloads
git clone https://github.com/rvaiya/keyd
cd keyd
make && sudo make install
sudo systemctl enable --now keyd

Find your mouse button name

sudo keyd monitor

Click your side buttons and note what keyd calls them (e.g. mouse2, mouse5). Press Ctrl+C when done.

Also note the full device ID of your mouse from the device list, e.g.:

device added: 1532:00c1:e4681ccf Razer Razer Viper V3 Pro (/dev/input/event4)

Using the full vendor:product:hash ID is important - gaming mice like the Razer Viper V3 Pro expose multiple devices with the same vendor:product, causing duplicate key events if you target just 1532:00c1.

Create a keyd config

sudo nano /etc/keyd/default.conf
[ids]
1532:00c1:e4681ccf

[main]
mouse2 = f15

Replace 1532:00c1:e4681ccf with your actual device ID and mouse2 with your button name. F15 is a good choice - high enough that nothing else uses it.

sudo systemctl restart keyd

Verify it's working correctly - one press should produce exactly one f15 down and one f15 up:

sudo keyd monitor

Bind in TeamSpeak 6

In TS6 go to Settings → Hotkeys, click + next to Push to Talk (PTT), and press your mouse side button. TS6 will now bind to it. You'll see something like XF86Launch6 in the TS6 hotkey binding dialog.

Reconfigure mouse pointer speed after keyd

Once keyd is running it creates a keyd virtual pointer device. KDE Plasma will use this as your mouse device and your pointer speed / acceleration settings will reset to defaults.

Go to System Settings → Mouse and you will see the new keyd virtual pointer device listed. Configure your pointer speed and acceleration here to match your previous settings.

How it works

[You press mouse side button]
      ↓
[keyd translates it to F15 - kernel level, transparent to everything above]
      ↓
[TS6 running under XWayland sees F15 as a global hotkey]
      ↓
[PTT activates]

Discord

Got dragged onto Discord? The fix is the same principle - run it under XWayland. keyd is still needed if you want a mouse side button for PTT.

Option A: Flatpak (recommended)

flatpak install --user flathub com.discordapp.Discord

Open Flatseal, select Discord, scroll to Socket, and disable Wayland windowing system. Done - PTT and global hotkeys will work. Bind your key directly in Discord's Settings → Keybinds.

Option B: Native .tar.gz

Download the Linux tar.gz from https://discord.com/download and extract it to ~/.local/opt/:

cd ~/Downloads
tar -xzf discord-*.tar.gz
mv Discord ~/.local/opt/Discord

Unlike TS6, Discord does not install itself on first run. It ships a discord.desktop inside the folder but the Exec= line points to /usr/share/discord/ which doesn't exist for a user install. Copy it to your applications folder and fix just that one line:

cp ~/.local/opt/Discord/discord.desktop ~/.local/share/applications/discord.desktop
nano ~/.local/share/applications/discord.desktop

Change the Exec= line to point to your actual path and add --ozone-platform-hint=x11:

Exec=/home/YOUR_USERNAME/.local/opt/Discord/Discord --ozone-platform-hint=x11

Everything else in the file (Icon=, Path=, etc.) is fine as-is. Save and Discord will now appear in your application launcher with XWayland mode enabled.

For the truly hardcore non-Flatpak crowd, there's also wayland-push-to-talk-fix by Rush which takes a lower-level evdev approach - but the XWayland method above is simpler and works just as well.

Autostart Discord

Discord has a built-in startup option — no need to configure anything in KDE. Open Discord and go to Settings → Linux Settings → Open Discord on Startup and toggle it on.

Mouse side button for Discord PTT

Same as TeamSpeak - if keyd is already set up from Part 3, your mouse button remapping carries over. Just bind the same key (e.g. F15) in Discord's Settings → Voice & Video → Push-to-talk Keybind.

Future: KDE Plasma 6.7

KDE Plasma 6.7 is set to include a global push-to-talk feature built directly into the compositor. Rather than relying on individual apps to implement the xdg-desktop-portal Global Hotkeys spec, Plasma itself will handle PTT at the system level - muting all connected microphones until your chosen key is held down, regardless of which application is focused or whether it supports Wayland hotkeys at all.

This means the XWayland workaround in this guide will eventually become unnecessary for microphone muting. It will work with any voice chat app automatically - TeamSpeak, Discord, whatever - without any per-app configuration.

See: KDE Plasma 6.7 will have a global push-to-talk feature (GamingOnLinux, January 2026)

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment