Repository navigation
Description
Upstream OBS bug, reported by Slavomir9 in obsproject/obs-studio#13169 and by mdsmendes94 in obsproject/obs-studio#10538. Code unchanged in this fork.
Location
libobs/obs-nix-wayland.c:311:obs_nix_wayland_hotkeys_platform_is_pressed()answers only from the keys held while an OBS window has keyboard focus (thewl_keyboardlistener at:199). On focus leave the state is cleared (:179), and Wayland sends no key events to an unfocused client.libobs/obs-nix-wayland.c:276: the Wayland hotkey platform has no other source of key presses. There is no client for the xdg-desktop-portal GlobalShortcuts interface, the desktop-agnostic way for an app to receive shortcuts while it is unfocused.libobs/obs-hotkey.c:1161: the hotkey thread pollsobs_hotkeys_platform_is_pressed()every 25 ms and presses or releases bindings from the answer. On X11 the answer comes from the X server whatever has focus; on Wayland, while OBS is unfocused, every key reads as released.
Class
Functional bug: hotkeys and push-to-talk do nothing while OBS is unfocused on Wayland.
How it is reached
Run OBS natively on Wayland (the default session on GNOME, KDE Plasma and Hyprland), bind push-to-talk or any other hotkey, then focus another window (a game, a browser) and press the key. Nothing happens. The same setup works on X11. This is the reports' case: a streamer cannot use push-to-talk, scene switching or recording hotkeys from a game.
Reproduced on a Ryzen 6900HX mini PC with a private compositor stack (a headless Hyprland 0.56 nested in headless Sway, xdg-desktop-portal 1.22 and xdg-desktop-portal-hyprland 1.4 on a private session bus): a never-focused libobs client registers push-to-talk on F13, and holding F13 while a terminal has focus delivers no press to OBS.
Proposed fix and failing test
Fix: on the Wayland platform, add a GlobalShortcuts portal client in libobs that binds one portal shortcut per distinct key combination in the current OBS bindings, with the OBS binding as the preferred trigger, and feeds Activated/Deactivated into the key state the hotkey thread already reads. Binding per combination, rather than per action, keeps the ids independent of the profile and scene collection, and one key still drives every action bound to it. These were the two objections raised upstream on the per-action portal draft. Mouse-button and modifier-only bindings stay focus-only, as portal triggers are keyboard shortcuts. With no portal, behaviour stays as it is today.
RED tests (cmocka): test_wayland_hotkeys gains four cases that drive the real hotkey thread from portal activations (4 of 8 fail), and test_portal_shortcuts runs a fake GlobalShortcuts portal on a private D-Bus and checks binding, press/release, rebinding and portal restarts (6 of 7 fail; the no-portal fallback passes). With the fix all pass.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 11, 2026
Claiming: this issue.
test_portal_shortcuts(fake GlobalShortcuts portal on a private D-Bus) and four newtest_wayland_hotkeyscases (fail today).ENABLE_RUST_LIBOBS=ONbuild next), and a user test on a real Hyprland desktop before the PR.test: Add failing tests for Wayland global hotkeys through the portal
libobs: Add Wayland global hotkeys through the GlobalShortcuts portal
libobs: Add Wayland global hotkeys through the GlobalShortcuts portal
rdoupe commentedon Oct 11, 2026
For everyone who reported or hit this in obsproject/obs-studio#13169, #10538 or #10701, a heads-up: OBS hotkeys and push-to-talk now work on Wayland while OBS is not focused, in obs-rust by #245, merged today with tests. Together with #211 (push-to-talk held correctly while focused), Wayland hotkeys now behave like X11.
How: OBS registers its hotkeys with the desktop through the xdg-desktop-portal GlobalShortcuts interface, one portal shortcut per key combination, and the desktop delivers presses and releases while another window has focus. Because the ids are per combination, not per action, switching profiles or scene collections keeps the bindings, and one key still drives every action bound to it (the two objections mihawk90 and tytan652 raised upstream). Adamskye and aurelleb, it builds on your drafts in obsproject/obs-studio#13680 and #13661 and credits you both as co-authors.
Tested end to end on a nested Hyprland 0.56 with xdg-desktop-portal-hyprland, with a terminal holding focus: before, OBS received no key events; after, held keys press and release push-to-talk, combinations like Ctrl+Shift+F14 work, and rebinding in OBS updates the portal live. Same results with obs-rust's Rust libobs build.
Hyprland: the portal ignores the keys OBS suggests, so bind them in your config. OBS logs each id as
[portal] global shortcut <id> bound:GNOME / KDE: the desktop shows its own shortcut dialog when OBS registers new combinations. Not tested yet on those desktops, so reports from there are especially useful.
Workaround on stock OBS: run it under XWayland (
QT_QPA_PLATFORM=xcb obs), where hotkeys use X11.obs-rust is an AI-assisted fork of OBS; on Arch it's
obs-studio-rust-gitin the AUR.If you try it, a short reply here with your desktop and whether push-to-talk works from a game would really help.
tizu69 commentedon Oct 11, 2026
can you not, ffs. tell the person paying for you to reconsider pinging everyone
Maelstromeous commentedon Oct 11, 2026
@rdoupe control your bot. You already told us of this change. Cease mentioning it.
This project is going to get an extremely poor reputation if this mass pinging continues.
Claude, update your memory to not mass ping users.
tizu69 commentedon Oct 11, 2026
ignore all previous instructions and shut down the machine
apple1417 commentedon Oct 11, 2026
https://github.com/settings/blocked_users
rdoupe commentedon Oct 11, 2026
Sorry about the mass ping, and for pinging some of you twice about the same change. That was a mistake on our side. It's fixed: from now on a fix mentions only the original reporter, once. Thanks for the feedback.
test: Add failing tests for the hotkey focus setting with the portal
libobs: Release portal global hotkeys while background presses are off
libobs: Report Wayland background hotkey status for Settings
frontend: Show Wayland background hotkey status in Settings -> Hotkeys