I stumbled across this today. I have been using xmodmap for years to do this, but it has issues, it has a tendency to stop working.
cd /usr/share/X11/xkb/symbols
sudo cp gb hyper #Replace gb with your locale
sudo nano hyper
Add the following code within the { }s of xkb_symbols “basic”.
key <CAPS> {[ Hyper_L ]};
key <HYPR> {[ Hyper_R , Hyper_L ]};
modifier_map Mod3 { <HYPR> };
Ensure that there are no syntax errors
setxkbmap -layout hyper
If there are syntax errors, the command will refuse to load the layout.
The Capslock should be converted to Hyper now. You can test it by setting shortcuts to something in your window manager.
setxkbmap only loads the layout for current session. To make the changes permanent, use the following command
localectl --no-convert set-x11-keymap hyper
Source: https://ibnishak.github.io/blog/post/caps-to-hyper/
You will probably want to add to your startup:
setxkbmap -option shift:both_capslock
To regain caps lock function (by pressing both shifts together).
Plasma cannot see the hyper key, but sxhkd can be used to add additional hotkeys.
hyper+KP_Add
bopp
hyper+KP_Subtract
bopm
hyper+Tab
skippy-xd --toggle-window-picker
hyper+d
rofi -show drun