Skip to content

GNOME without a shortcuts portal: one click adds Hex's custom keyboard shortcuts (#781) - #785

Merged
thdxr merged 2 commits into
devfrom
gnome-keys
Nov 1, 2026
Merged

thdxr merged 2 commits into
devfrom
gnome-keys

Conversation

@thdxr

@thdxr thdxr commented Nov 1, 2026

Copy link
Copy Markdown
Member

for #781 (@haroon0x, gnome 46 / ubuntu 24.04)

gnome 46 has no globalshortcuts portal, so hex falls back to the hex commands and you had to bind them by hand. now, on gnome, settings › desktop shortcuts has add gnome keyboard shortcuts:

  • it writes hex-dictation (hex dictation toggle), hex-paste-last and hex-annotate (new hex annotate toggle, while annotate is on) into org.gnome.settings-daemon.plugins.media-keys custom-keybindings via gsettings, using your hex shortcuts as gtk accelerators. dictation toggles because gnome runs custom shortcuts on the press only.
  • it's an opt-in setting (gnome_keyboard_shortcuts). the shortcuts are written while hex listens and removed when hex is disabled, then come back on enable. remove turns it off.
  • an entry that already exists keeps the key the user set in gnome settings. other custom shortcuts are never touched.
  • the gsettings helpers move to linux/gsettings.

checked on apollo: headless sway, private bus, XDG_CURRENT_DESKTOP=GNOME, the portal configured with no globalshortcuts (like gnome 46), and gnome-settings-daemon 51's media-keys schema on a keyfile backend seeded with an unrelated custom0:

  • hex logs "no GlobalShortcuts portal" and settings shows the row (screenshot)
  • adding writes the three entries with the right commands and keys
  • disable removes them, enable restores them, and remove clears them
  • custom0 survives every step

windows clippy is clean.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant