2

I want to use Caps Lock for the Hyper key because I need it in Emacs, so in /etc/default/keyboard I use the relevant XKBOPTIONS.

However, Unity seems to react to both: even though it passes Hyper_L through so it works in Emacs, the launcher and/or the HUD keeps popping up. I thought this was happening because xmodmap shows that both of them are assigned to mod3, so I ran xmodmap with

clear Mod3
clear Mod4
add Mod3 = Hyper_L
add Mod4 = Super_L

which now works, but I am under the impression that xmodmap is deprecated. Is there a way I can achieve the same with XKBOPTIONS?

EDIT I forgot to mention that I am asking this because xmodmap settings are lost when I switch layouts.

1 Answers1

0

You can't currently do it with an option, however it is possible to change it without modifying any system files. See my answer here: https://askubuntu.com/a/794087/514921. I believe this will persist across layout changes, but I have not tried it.

ergosys
  • 260