# getting backlit keyboard to work

## ka0ttic

I bought this "gamer" keyboard/mouse combo from Cooler Master the other day.  I'm not a gamer, but I wanted the blue backlit keyboard because more of than not, I'm using my computer in the dark and I can never see the keys.  I was hoping it would just work out of the box on the hardware level and that I wouldn't have to worry about it, but unfortunately that is not the case.  The backlight is toggled on and off using the Screen Lock key.

On the console, hitting the screen lock key does turn the backlight on, but it also does what that key is supposed to do and locks the keyboard.  I'm sure it wouldn't be a big deal disabling the Screen Lock function on the console, but I mainly use X, so I'm not too concerned with that.

In X, hitting the Screen Lock key does nothing at all.  No backlight, no screen lock.

Google'ing the keyboard model (Cooler Master MB24) and linux yields absolutely nothing.  The kernel sees the keyboard as a "SINO WEALTH USB keyboard."  Google found this. I am assuming this keyboard uses that controller.

Any ideas on getting this working?

----------

## Fitzcarraldo

I helped someone with a Cooler Master Devastator get his backlight working with the Scr Lk key. I got him create a simple Bash script along the lines shown below to toggle the backlight on/off, and set up a keyboard shortcut to launch it. Would that work in your case? If not, perhaps you could bind the script to a different key.

```
#!/bin/bash

if [ -f /home/ka0ttic/keyboard_led ]; then

   xset -led named "Scroll Lock" && rm /home/ka0ttic/keyboard_led

else

   xset led named "Scroll Lock" && touch /home/ka0ttic/keyboard_led

fi
```

```
chmod +x /home/ka0ttic/toggle.sh
```

For KDE:

System Settings

Shortcuts and Gestures

Custom Shortcuts

Preset Actions

Right-click

New > Global Shortcut > Command/URL

Comment = Toggle keyboard backlight on/off

Trigger | Shortcut:

Click on None and press the Scr Lk key

Action | Command/URL: /home/ka0ttic/toggle.sh

Apply

----------

## ka0ttic

Thanks! According to the wife it looks like that worked. I had her watch it as I logged in remotely (I'm at work) and toggled it on/off.  Just had to add '-display :0' arg to that xset command.

Wasn't expecting it to be that easy of a fix   :Very Happy: 

Thanks again,

Aaron

----------

