You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: adopt xdg-desktop-portal GlobalShortcuts API #38288
this way, app developers do not need to make any other changes to their code (besides updating the version of electron they use)
Alternatives Considered
it might be worth making this a new JS API instead, but I predict that would lead to poor adoption and thus increased frustration for Linux users of electron-based apps
other approaches include using root permissions to bypass the wayland / flatpak security model in order to maintain direct access to user input events, but this seems a lot less safe than the proposed solution
Additional Information
These Linux desktop environments have already implemented the GlobalShortcuts portal:
Reacted by Simon Schneegans, Pablo, Suraj, Odin Hørthe-Omdal Urdland, Maksim Lin, Stephan Sokolow, Ramiro, Michael Ferrari, Richard Février, Miranda and 31 more
It seems like this would address #42573 and #15863.
Wayland finally has practically all blockers resolved after many years, and as a result it is increasingly popular. This, or a comparable solution, really must be implemented for Electron to be living up to what it promises. Entire applications rely on the globalShortcut feature.
Users are going to be forced onto Wayland in the coming months and there isn't even a meaningful discussion yet on this topic. That discussion really needs to begin ASAP.
Reacted by Simon Schneegans, Yumeo, madmalkav, JongWasTaken, Sarah, DaPigGuy, AFCMS and Suraj
I understand this as a goal but we're not prepared to or interested in deviating from Chromium in order to accomplish it. Our entire globalShortcuts mechanism is directly plumbed to chrome/browser/extensions/global_shortcut_listener.h.
Your best path forward here is to raise an issue with Chromium at https://issues.chromium.org/issues and ask them to update their underlying implementation.
Reacted by Mr Beedell, Roke Julian Lockhart, Nantris, Suraj and bbb651 🇮🇱
My understanding is this is still blocked on crbug.com/1196508, because whether the interface is actually needed or not is not clear.
Note that, if we need this for wayland, at least we need extension API (i.e. we cannot implement on top of the current protocol fully, AFAIK).
If needed, we can add that to exo (on CrOS), but adding it to Linux (e.g. weston) is another bar.
Reacted by Ron Waldon-Howe, Mr Beedell, Roke Julian Lockhart, Nantris, Suraj, Bas van den Wollenberg and AFCMS
@codebytere can we get this re-opened in light of the news above? Or otherwise should we create a new issue? Lack of global shortcuts is killing us.
Electron is based on Chromium. So xdg-desktop-portal will be included when they make use of the Chromium version that patch was made for. Re-opening does not make sense, as it has now been solved. Now we just have to wait.
Reacted by Nantris, Mr Beedell, Roke Julian Lockhart and v-marinkov
#45607 seems to suggest otherwise (or is it unrelated?), in which case this issue should be reopened
Else, it can stay closed as not planned
As far as I can tell, that issue is related to a bug of the feature, whereas this issue is about the feature itself. If the bug still exists, the issue you link should be re-opened. Not this one.
It's not clear that global shortcuts work even in the versions that have this change (and I'm not sure which do sorry.) I just wanted to let you know that personally global shortcuts remain dead for us on Wayland (which is a big problem since perhaps our biggest feature is the global shortcut.)
Reacted by Ron Waldon-Howe and Víctor Cuadrado Juan
Activity
Nantris commentedon Jun 19, 2024
It seems like this would address #42573 and #15863.
Wayland finally has practically all blockers resolved after many years, and as a result it is increasingly popular. This, or a comparable solution, really must be implemented for Electron to be living up to what it promises. Entire applications rely on the
globalShortcutfeature.Users are going to be forced onto Wayland in the coming months and there isn't even a meaningful discussion yet on this topic. That discussion really needs to begin ASAP.
Nantris commentedon Jul 9, 2024
Friendly bump. The window to address this without massive disruptions is closing.
codebytere commentedon Jul 20, 2024
I understand this as a goal but we're not prepared to or interested in deviating from Chromium in order to accomplish it. Our entire
globalShortcutsmechanism is directly plumbed tochrome/browser/extensions/global_shortcut_listener.h.Your best path forward here is to raise an issue with Chromium at https://issues.chromium.org/issues and ask them to update their underlying implementation.
beedell-roke commentedon Jul 20, 2024
benstigsen commentedon Jul 22, 2024
As far as I can tell, there is already an open issue about this (https://issues.chromium.org/issues/40759171)
Quote (latest message Apr 13, 2023):
lifebound commentedon Nov 21, 2024
This looks to have been merged Nov 19 2024 https://chromium-review.googlesource.com/c/chromium/src/+/5871484
Nantris commentedon Nov 21, 2024
@codebytere can we get this re-opened in light of the news above? Or otherwise should we create a new issue? Lack of global shortcuts is killing us.
benstigsen commentedon Nov 21, 2024
Electron is based on Chromium. So
xdg-desktop-portalwill be included when they make use of the Chromium version that patch was made for. Re-opening does not make sense, as it has now been solved. Now we just have to wait.Nantris commentedon Nov 21, 2024
@benstigsen you're right. I'm conflating this with issue #42573.
Malix-Labs commentedon Apr 16, 2026
#38288 (comment) from @benstigsen :
#45607 seems to suggest otherwise (or is it unrelated?), in which case this issue should be reopened
Else, it can stay closed as not planned
benstigsen commentedon Apr 16, 2026
As far as I can tell, that issue is related to a bug of the feature, whereas this issue is about the feature itself. If the bug still exists, the issue you link should be re-opened. Not this one.
jokeyrhyme commentedon Apr 16, 2026
what's the oldest version of electron that has this feature? or is it yet to be released? cheers! <3
Nantris commentedon Apr 16, 2026
It's not clear that global shortcuts work even in the versions that have this change (and I'm not sure which do sorry.) I just wanted to let you know that personally global shortcuts remain dead for us on Wayland (which is a big problem since perhaps our biggest feature is the global shortcut.)