I am using CachyOS KDE. This system is based on the arch family. I would like to know how I can disable sleep mode in the start menu and in the sddm login screen. Is there such a possibility? I would like the sleep options to disappear completely. The version of kde I am using is 5.27.6.
1 Answer
There's an answer that is not window-manager specific here: https://askubuntu.com/questions/115333/how-do-i-disable-the-sleep-button-on-my-keyboard . See Zatigem's answer that is quite detailed.
The gist of it is to use xmodmap (for your session, add it to startup files etc):
# check the keycode for the sleep function
xmodmap -pk | grep -i sleep
150 0x1008ff2f (XF86Sleep) 0x0000 (NoSymbol) 0x1008ff2f (XF86Sleep) 0x0000 (NoSymbol) 0x1008ff2f (XF86Sleep) 0x1008ff2f (XF86Sleep)
# disable it
xmodmap -e 'keycode 150='