Yesterday I acquired a keyboard for one of my computers, specifically the Genius GX Gaming Scorpion K215 grata was my surprise when activating the backlight of it in Windows.

Minutes later my dear Deepin started but the good does not last forever, when I pressed the light switch, nothing happened. So I decided to look for the solution to the problem that apparently is present in many distributions.

I quickly detected that running xset led 3 in a terminal, the lighting came on; while to turn it off, you had to run xset led 3 led off. The challenge was to automate this function in the simplest way and assign the corresponding key on the keyboard.

After failing with dconf-editor, instinct made me think of a script that would carry out the task, and turn on the system, but it was not the way it worked in windows. So choose to combine a little bash script with the system tools.


  • We will open the Deepin control center, go to the keyboard settings and display custom shortcuts, we start by filling in the name box. For the example I chose Keyboard light.
Click on the image to see full size
  • Next we paste the script that I leave below, in the command box.
if [ -f /tmp/keyboard_light ]; then
xset -led 3 && rm /tmp/keyboard_light
xset led 3 && touch /tmp/keyboard_light
  • Later we go to the last box, called "Shortcuts" we click on "None" and then we will press the combination of keys that we choose to carry out the action. In my case Control and Scrollock which is the physical key that turns on the backlight. Finally we restart the session.
  • As the image shows, the magic has been done but there are still things to fine-tune, since the Deepin control center only allows you to associate a key combination with an action, but does not support assigning a single key.
  • To achieve this we open the file manager and in its configuration options we check, show hidden files. Now we go to the home folder on the path .config / deepin / dde-daemon / keybinding and we will edit the file custom.ini
Click on the image to see full size
  • In it we appreciate that the two keys previously used are represented, we proceed to eliminate the highlighted in blue that corresponds to the control key, save and restart the session.

The goal has been met and the backlight will now go on and off when you press the physical key assigned by the keyboard manufacturer.

We hope you find it useful and we are waiting for the final version of Deepin 20. «Take care«.

5 1 vote
Califica el Artículo
Report of
10 Comentarios
Más populares
Más nuevos Más antiguos
Opinión en línea
Ver todos los comentarios
Ernesto Junco
Ernesto Junco (@ernesto_junco)
1 mes atrás

How interesting, I'm going to try it with my keyboard.

Eli (@eli)
1 mes atrás

Very interesting solution Car Car and the keyboard is very nice, hopefully you will find something like this to control the lights of my PC in Linux en

Peligroso Mario
Peligroso Mario (@peligrosomario)
1 mes atrás

Uffff it worked very well! thanks Car….

pitter (@pitter)
24 días atrás

A pity, I could not manage the tutorial.

When launching the command (xset led 3 or xset led on) I have no response from the system. I have a Samsung np670 Notebook with a backlit keyboard. I have functionality of the other computer keys, but I always have problems with the backlit keyboard.

I have deepin 20

pitter (@pitter)
Respondiendo a  Car
24 días atrás

Car Car Thanks so much for the help, but it didn't work. Check the bios and I do not have the section to activate or deactivate the keys. Similarly, the strange thing is that the other keys work. About two years ago with this same team I installed ubuntu and it did not work for me at the first time, I had to install Samsung-tools. This tool activated the keyboard and the other keys, but now deepin does not allow me to install this tool.

Too bad, I just installed deepin and it looks great. But I will keep trying.

Nos gustaría saber lo que piensas, Únete a la discusión.x