VirtualBox No backlight on CMSTORM keyboard

摘要: This article shows you how to enable the backlight feature (Screen Lock key) on a CMSTORM keyboard.

This article shows you how to enable the backlight feature (Screen Lock key) on a CMSTORM keyboard.

Environment

  1. VirtualBox 5.1.14
  2. Ubuntu 16

1. Solution – Quick

To fix it quickly, run the following command in a terminal, and press the “Screen Lock key” again, the backlight should be enabled.

Terminal
$ xmodmap -e 'add mod3 = Scroll_Lock'
Note
If the VM is restarted, you need to issue the same command again!

2. Solution – Shell Script + Auto Start

The permanent solution is creating a shell script and set its auto start.

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

/home/mkyong/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 mkyong mkyong 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 mkyong mkyong 4.0K Feb   5 10:24 ..
4.0K -rw-r--r--  1 mkyong mkyong   67 Feb   5 10:24 backlight.sh
$ chmod +x backlight.sh 
$ ls -lsah
total 12K
4.0K drwxr-xr-x  2 mkyong mkyong 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 mkyong mkyong 4.0K Feb   5 10:24 ..
4.0K -rwxr-xr-x  1 mkyong mkyong   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/mkyong/scripts/backlight.sh
X-GNOME-Autostart-enabled=true

Done. Restart VM.

References

  1. Xmodmap example
  2. xmodmap Hints and Tips

上一篇: VirtualBox Ubuntu slow and laggy UI
下一篇: VirtualBox Copy and Paste between host and guest machine
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号