Add KGlobalAccel::setInverseShortcutActions() to the API

Goes with plasma/kglobalacceld!95 for the server-side implementation, and plasma/kwin!9100 for a first component making use of this new function.

This is meant to support gesture customization UX in particular, and is the only public API from my original gesture prototype that survives as such instead of being taken private. It can also be used for optimizing keyboard shortcut UX, though.

This call allows a component to specify a pair of actions that are considered the inverse of each other - concepts like forward/backward, undo/redo, increase/decrease, grow/shrink, horizontal or vertical navigation. Furthermore, the API allows declaring whether the coupling of these two actions is mandatory (default) or optional.

This information can be used as follows:

  • System Settings can suggest or insist on changes for shortcuts of both actions when one is reassigned or unassigned.
  • The KGlobalAccelD service can decide not to activate a shortcut if no inverse shortcut is set, in case of mandatory coupling.
Edited by Jakob Petsovits

Merge request reports

Loading