this post was submitted on 23 Feb 2025
56 points (96.7% liked)

Linux

50398 readers
806 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] infeeeee@lemm.ee 17 points 12 hours ago* (last edited 12 hours ago) (3 children)

It wasn't clear for me what the hell is a "Global Shortcut" I heard the term first time in my life, I found the answer in the upstream PR:

It's designed so that applications can register actions that can be triggered globally (i.e. regarless of the system's state, like focus).

It's strange it wasn't possible until now, or the main thing it's now DE independent?

On Gnome I use Run or raise extension, and with this I can run or switch to running apps with global shortcuts, so this was definitely working from Gnome extensions.

[–] merthyr1831@lemmy.ml 11 points 8 hours ago

It's because this feature was implemented as a pseudo-keylogger on X11. All X clients could listen to the compositor state at all times (including input), even if input was focussed on another (potentially sensitive) application.

In Wayland, clients have almost zero knowledge of the compositor's state. This was an explicit design choice to enhance security and enable modular features via wayland protocols. Of course, this also killed every implementation of app-specific global shortcuts.

Wayland protocols take a lot of time to get agreed on - They need multiple implementations across different compositors (usually means KDE and GNOME need to implement the protocol spec and agree to it) and the specs can take a long time to design and reach production.

Obviously this does hurt uptake for Wayland since issues can take years to resolve, but the core team are very aware of the pitfalls of X11's development and have long preferred this slow and methodical approach in the hopes it's sustainable and maintainable into the future.

[–] that_leaflet@lemmy.world 26 points 11 hours ago (1 children)

Gnome Extensions run in the Gnome shell, so they have special privileges.

Wayland’s security focus prevents apps from listening in on all user key presses, which means they can’t know you used a keyboard shortcut unless the app is focused.

The Global Shortcut Portal was made to address this. An app registers for a global shortcut, and when the user activates the shortcut, the portal tells the app that it’s been activated.

[–] infeeeee@lemm.ee 2 points 11 hours ago

Thanks for the context!

[–] priapus@sh.itjust.works 4 points 9 hours ago

This is Wayland specific. Wayland does not allow unfocused applications to intercept keyboard shortcuts for security purposes, so this is how they must be implemented.