You are not logged in.

#1 2022-12-29 14:16:19

zaxdan69
Member
Registered: 2016-06-04
Posts: 318

Problem with keyboard scroll lock key

I recently changed my keyboard to a model which Is defind as:

ID 062a:0201 MosArt Semiconductor Corp. Defender Office Keyboard (K7310) S Zodiak KM-9010

in lsusb.
Before I had an old logitech G11 keyboard(In which the led worked fine) and I had set  the option "grp_led:scroll" in "/etc/X11/xorg.conf.d/00-keyboard.conf", so the led indicates the keyboard layout change.
With this new keyboard that doesn't work any more and also the led doesn't toggle on/off when I press the scroll lock key as happens with the other two(num lock and caps lock).
I've searched about this and I found 2 relative but old threads:

https://bbs.archlinux.org/viewtopic.php?id=175338
https://bbs.archlinux.org/viewtopic.php?id=141627

From those I found that the led works fine in virtual consoles and lights on/off by pressing the key.
Also I can light it on/off manually with "xset led" command. I also found that the keyboard seems that isn't in utf8 mode and it is in some unknown mode.
I can change it manually again with:

sudo  kbd_mode -f -u

After that I can change led's state by pressing the scroll lock key, but still doesn't work as indicator when change keyboard layout.
So I'm stuck here. Is there something else I can do to make it behaves as with the old keyboard?

Offline

#2 2026-07-10 15:58:03

fahim.chuchu
Member
Registered: 2026-07-10
Posts: 3

Re: Problem with keyboard scroll lock key

Use Scroll Lock to turn on/off Keyboard Backlight

Finally, I have got the exact solution after suffering and trying many methods for 2 years. This method works on XFCE system without any problem. For other DEs, try and see if it works.

  1. Install numlockx:
    Ubuntu / Debian / Mint:

    sudo apt install numlockx

    Fedora / RHEL:

    sudo dnf install numlockx

    Arch / Manjaro:

    sudo pacman -S numlockx
  2. Paste the script:

    cd /usr/local/bin/
    sudo nano toggle_led.sh
    #!/bin/bash
    if xset q | grep -q "Scroll Lock: off"; then
        xset led named "Scroll Lock"
        numlockx on
    else
        xset -led named "Scroll Lock"
        numlockx on
    fi
  3. Bind Keyboard Shortcut:

    • Goto Keyboard

    • Add

      /usr/local/bin/toggle_led.sh
    • Press Scroll Lock

    • Keep the Startup Notification turned off.

  4. Log out & Relogin your session.

Now, pressing the Scroll Lock will turn on/off the keyboard light.

Extra Note: numlockx is required to keep the numpad working after executing

xset led

command. If you don't have numpad in your keyboard, you can skip the Step-1 and also remove the

numlockx on

lines from the script.

Offline

#3 2026-07-10 18:00:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: Problem with keyboard scroll lock key

Using this opportunity to close this old thread


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB