How do I enable Scroll Lock?

xmodmap -e 'add mod3 = Scroll_Lock'

(Note the difference in the single-quotes!)

Copy this and paste it in a terminal.

Then the error will no longer occur.

I have used this command successfully on my Ubuntu 12.04 system.


Or you can switch the lights with these:

On:

xset led named "Scroll Lock"

Off:

xset -led named "Scroll Lock"

Works on Ubuntu 12.04 x86 for my SpeedLink illuminated keyboard (SL-6453-SSV-A).


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 dpkg-reconfigure xkb-data