I come from Windows and I used middle click (MOUSE3) as the toggle mic button for Discord app and it worked globally, regardless if it was focused or not.
I am now configuring my EndeavourOS (KDE Plasma 6.6.3, Wayland) and I can’t do the same bind work globally, only when focused in Discord. The workaround has been to use input-remapper from middle click to F24, but it 1. makes my mouse communicate with the OS through a virtual device, messing with my mouse setting and 2. conflicts with gamescope when I’m inside a game because of -force-grab-cursor(raw input). Isn’t there a cleaner workaround?
What desktop environment are you using and is it a wayland or xorg session?
Speaking for me, the only way I could get at least push to talk functional while discord is unfocused in KDE Wayland was allowing listening for keystrokes, and listening for mouse buttons under Application Permissions.
I am using KDE Plasma 6.6.3 on a Wayland session, I did what you did but middle click still doesn’t toggle mic with Discord unfocused.
EDIT: I fixed this issue by changing the session from Wayland to X11, I hope Wayland fixes this issue
I wished it was as easy as changing session to X11, but X11 has a core functionality that is impossible to disable which is paste on middle click, does anyone have a solution for X11 or Wayland?
Have you tried this tool yet? This is what I had to use on X11 sessions like Xfce.
https://github.com/milaq/XMousePasteBlock if you like to build from source.