VirtualBox - Pas de rétro-éclairage sur le clavier CMSTORM

VirtualBox - Pas de rétroéclairage sur le clavier CMSTORM

cmstorm keyboard

Cet article vous montre comment activer la fonction de rétroéclairage (touche de verrouillage de l'écran) sur un clavier CMSTORM.

Environnement

  1. VirtualBox 5.1.14

  2. Ubuntu 16

1. Solution - Rapide

Pour résoudre ce problème rapidement, exécutez la commande suivante dans un terminal et appuyez à nouveau sur la touche «Verrouillage de l'écran», le rétroéclairage doit être activé.

Terminal

$ xmodmap -e 'add mod3 = Scroll_Lock'

Note
Si la VM est redémarrée, vous devez émettre à nouveau la même commande!

2. Solution - Script Shell + Démarrage automatique

La solution permanente consiste à créer un script shell et à définir son démarrage automatique.

2.1 Create a shell script, and put the following content:

/home/example/scripts/backlight.sh

#!/bin/bash
sleep 1
xmodmap -e 'add mod3 = Scroll_Lock'
xset led 3

2.2 Make above shell script executable – chmod +x backlight.sh

Terminal

$ ls -lsah
total 12K
4.0K drwxr-xr-x  2 example example 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 example example 4.0K Feb   5 10:24 ..
4.0K -rw-r--r--  1 example example   67 Feb   5 10:24 backlight.sh

$ chmod +x backlight.sh

$ ls -lsah
total 12K
4.0K drwxr-xr-x  2 example example 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 example example 4.0K Feb   5 10:24 ..
4.0K -rwxr-xr-x  1 example example   67 Feb   5 10:24 backlight.sh

2.3 Create a /etc/xdg/autostart/backlight.desktop file and set the above shell script auto start.

Terminal

$ sudo vim /etc/xdg/autostart/backlight.desktop

/etc/xdg/autostart/backlight.desktop

[Desktop Entry]
Type=Application
Name=Devastator Keyboard Backlight
Exec=/home/example/scripts/backlight.sh
X-GNOME-Autostart-enabled=true

Terminé. Redémarrez la VM.