2

KDE assign meta key to trigger the menu window but depending on the situation this does not always work.

This issue seem to be fixed on newer version of KDE but this is not yet widely distributed.

How to fix it ?

intika
  • 13,920
  • 7
  • 41
  • 79

1 Answers1

3
  1. First disable the meta key feature (source) : edit ~/.config/kwinrc, adding the following lines:
    [ModifierOnlyShortcuts]
    Meta=
  1. Then restart kwin with kwin_x11 --replace & disown.

  2. Map a new key to meta with xmodmap -e 'keycode 133 = F14' (F14 is used here)

  3. Set F14 as the shortcut to trigger the menu (right click on the menu then settings)

To make this permanent, step 3 needs to be added to startup

Update

Xmodmap changes does not seem to be kept after sleep/resume, here is how to set xmodmap on system resume with systemd: (non systemd user can use this)

  • Create xkeyboard resume script:

    touch /usr/lib/systemd/system-sleep/xkeyboard; chmod 755 /usr/lib/systemd/system-sleep/xkeyboard

  • Edit xkeyboard and fill it with:

    #!/bin/bash
    
    case $1 in
        pre)
            exit 0
        ;;
        post)
            export DISPLAY=:0
            sleep 10
            xmodmap -e 'keycode 133 = F14'
        ;;
    esac
intika
  • 13,920
  • 7
  • 41
  • 79
  • After restarting i get black screen, i can popup terminal, then launch others, but there's no panel or other things. I can open systemsettings5, but can't set F14 as trigger. – m3nda Jul 11 '22 at 17:31
  • Feels pretty overkill for a menu button :-/ – m3nda Jul 11 '22 at 17:52