Skip to content

Introduce KeybindingHelper - #713

Merged
lenemter merged 2 commits into
mainfrom
leolost/keybinding-helper
Sep 1, 2026
Merged

lenemter merged 2 commits into
mainfrom
leolost/keybinding-helper

Conversation

@leolost2605

@leolost2605 leolost2605 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Model it after Meta.Display.add_keybinding in mutter. This allows to easily add keybindings and takes care of resetting grabs when the settings change etc. This is done because we use it in quite a few indicators and wingpanel itself so IMO it makes sense to have a convenient api to do this.

This can be and is used now by wingpanel itself for the notifications action. It can also be used in the sound indicator for the media keys and will be used in the power indicator for the brightness media keys.

For the activation a KeybindingAction is introduced with several subclasses. I modeled this after Gtk.ShortcutAction because it is convenient to use and allows us to avoid memory leaks while keeping the internals private.

@leolost2605
leolost2605 requested a review from a team August 31, 2026 16:57
@danirabbit danirabbit added this to OS 9 Aug 31, 2026
@danirabbit danirabbit moved this to Needs Review in OS 9 Aug 31, 2026
@danirabbit
danirabbit requested a review from lenemter August 31, 2026 17:31
@lenemter
lenemter merged commit 24967c0 into main Sep 1, 2026
6 checks passed
@lenemter
lenemter deleted the leolost/keybinding-helper branch September 1, 2026 17:07
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in OS 9 Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants