Scroll Lock is not enabled by default
Submitted by CJ Duncan
Assigned to Xorg Project Team
Description
For some reason, Scroll Lock is not enabled by default. I submit this bug as an enhancement, since as of this moment, I have no idea why Scroll Lock is not already enabled by default. That is the behavior that I expect.
My laptop keyboard does not have a key for Scroll Lock, so I did not notice anything was amiss. It is not until I purchased a keyboard with LED lighting that I noticed that when I pressed the Scroll Lock key, nothing was happening. I was expecting that if I pressed the Scroll Lock key, then the Scroll Lock indicator LED would turn on and the LED in my keyboard would turn on as well, but none of those actions happen. The LED indicator for Caps Lock and Num Lock worked fine, but not for Scroll Lock.
I noticed that if I go to one of the virtual terminals, by pressing Ctrl + Alt + F1 to F6, the Scroll Lock key worked as expected, and when I returned to the graphical interface it stopped working again. That indicated to me, that it probably has something to do with the Xserver. I went surfing online and I learned about xmodmap. I keyed the command xmodmap -pm and it gave the following output:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
By commanding xmodmap -e "add mod3 = Scroll_Lock" it changed the xmodmap -pm output to:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 Scroll_Lock (0x4e) mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
Now the Scroll Lock works, but this change is temporary. Once the computer restarts, the settings reset. I went surfing a little more and I learned about how to make the change more permanent. I found an XKB configuration file located at /usr/share/X11/xkb/symbols/us and modify it by adding modifier_map Mod3 { Scroll_Lock }; in xkb_symbols "basic" After that, I did a reset to the XKB layout cache by executing sudo rm -f /var/lib/xkb/* and sudo rm -f /var/lib/lib/xkb/*
I restarted the computer, and now every time I use the keyboard, no matter how many times I restart the computer, the Scroll Lock key works.
I do not think that this should be the case. I was expecting the Scroll Lock key to work out-of-the-box. Can we change this so that it does work out of the box?