0

Using xmodmap to remap meta key with the following command:

xmodmap -e 'keycode 133 = F14'

How can i make the change permanent, especially on system sleep/resume ?

0

Reboot

On the setting panel (KDE/GNOME) there is a startup section where application can be added to startup session, xmodmap can be added there

Resume

Xmodmap does not keep the changes 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.