Enable scroll lock key permanently

Is there some way to enable the Scroll Lock key?

I’ve found that the command:

xmodmap -e 'add mod3 = Scroll_Lock'

will do the trick, but it has to be done every boot and it even last to next boot. It always stops working about 10 minutes.

I’m confused:

  • Does that command work until you reboot?
  • Does that stop working after 10 minutes?

Which of the 2 is it?

:thinking:

Sorry for my English. That command is useless, because every about 10 minutes I had toto use that command to activate scroll lock key functionality. Also after reboot.

But I’ve made some next internet research and found working solution.

I wonder why is caps lock key functionality not activated automatically…

Found the permanent way after a long night up with lots of half baked solutions.

# backup your symbols file
sudo cp /usr/share/X11/xkb/symbols/us{,.distribution} 

Add the following line in the xkb_symbols "basic" { section. do not worry if that second line is not there, it is only there for some languages and was not there for us on my system.

...
    modifier_map Mod3   { Scroll_Lock }; <==<< Add this line

    include "level3(ralt_switch)" <==<< before this line
};

You may have to do the same in your other layouts if you switch between languages

Also, there is a cache where xkb layouts live. You should clear it before restarting your X server to check the new keyboard symbol file(s).

sudo rm -f /var/lib/xkb/*
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.