Global shortcuts on (most) linux systems seem to get as straightforward as macos and windows.
This is a thing. freedesktop.org, Fedora, Flatpak is behind it and probably most platforms already implemented the org.freedesktop.portal.GlobalShortcuts interface.
Please use it.