https://bugs.kde.org/show_bug.cgi?id=506807

            Bug ID: 506807
           Summary: Meta/Super key shortcuts fail after being modified in
                    System Settings due to corrupt XKB configuration
                    generation.
    Classification: Applications
           Product: systemsettings
      Version First 6.3.5
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_keys
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
  Target Milestone: ---

SUMMARY
KDE System Settings generates a broken XKB configuration when changing global
shortcuts, which disables most Meta/Super key combinations.

STEPS TO REPRODUCE
Start with a fresh KDE configuration (e.g., by renaming
~/.config/kglobalshortcutsrc, ~/.config/kwinrc, and ~/.config/kxkbrc and
rebooting). At this point, default shortcuts like Meta+R for Spectacle work
correctly.

Open System Settings -> Workspace -> Shortcuts.

Change or re-assign any global shortcut that uses the Meta key. For example,
assign Meta+E to open Dolphin.

Click "Apply".

OBSERVED RESULT
Immediately after applying the changes, almost all Meta key shortcuts stop
working (e.g., Meta+E, Meta+I). The few exceptions are shortcuts handled
directly by KWin (Meta+Tab) or KRunner (Meta+Space).

The Meta key starts behaving like a level-shift key instead of a modifier. For
example, pressing Meta+I in a text editor inputs the character I instead of
triggering a shortcut. A temporary workaround (setxkbmap -layout "us,ru" ...)
fixes the issue for the current session, proving the problem is with the XKB
map generated and cached by KDE.

EXPECTED RESULT
The newly assigned shortcut should work, and all other existing Meta key
shortcuts should continue to function correctly. The Meta key should remain a
standard Mod4 modifier.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running kinfocenter in a terminal
window)
Linux/KDE Plasma: Manjaro Linux
KDE Plasma Version: [Вставьте вашу версию отсюда]
KDE Frameworks Version: [Вставьте вашу версию отсюда]
Qt Version: [Вставьте вашу версию отсюда]

ADDITIONAL INFORMATION
This is a very persistent issue that was narrowed down after extensive
debugging. Here is a summary of the key findings:

The issue is not hardware-related (tested with multiple keyboards) or
kernel-related (tested with multiple kernel versions).

The issue is system-wide (persists for newly created user accounts).

Low-level tools like evtest and xev show that the kernel and the X11 server
correctly receive the Super_L key events with the Mod4 modifier state.

However, libinput debug-events would not show key presses until the XKB map was
manually fixed, indicating the problem lies between the kernel and high-level
applications.

A temporary but fully working solution for a session is to run the command:
setxkbmap -layout "us,ru" -variant ",winkeys" -option "grp:alt_shift_toggle".
After running this, custom shortcuts (like one for Yakuake) start working
immediately, but built-in Plasma shortcuts do not until the services are
restarted.

The permanent workaround is to add the command above to autostart, which
successfully fixes the keyboard for every session.

This proves that the problem lies specifically with the configuration that
KDE's services generate and cache. Manually resetting config files
(kglobalshortcutsrc, kxkbrc) provides a temporary fix for one session, but as
soon as the System Settings "Shortcuts" GUI is used to apply any change, it
re-creates a broken configuration.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.15.3-1-MANJARO (64 bit)
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to