Skip to content
Commit 6b0b4cf4 authored by Martin Flöser's avatar Martin Flöser
Browse files

Support global shortcut to switch to specific layout

Summary:
Our keyboard layout kcm allows to set a global shortcut to switch to a
specific keyboard layout. So far KWin/Wayland did not support those
shortcuts, only the switch to next layout shortcut was supported.

This change introduces support for custom layout shortcuts. For that
we iterate over all available layouts and check whether a shortcut is
registered. If that is the case a QAction is created and passed to
KGlobalAccel.

As the triggering code is similar to the menu, the switchLayout lambda
is split out into a dedicated method and translating the layouts is
extracted into a method.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4256
parent 997af81e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment