VirtualBox - CMSTORMキーボードのバックライトなし

VirtualBox – CM STORMキーボードのバックライトなし

cmstorm keyboard

この記事では、CMSTORMキーボードでバックライト機能(画面ロックキー)を有効にする方法を示します。

環境

  1. VirtualBox 5.1.14

  2. Ubuntu 16

1. ソリューション–クイック

すぐに修正するには、ターミナルで次のコマンドを実行し、「画面ロックキー」をもう一度押します。バックライトが有効になります。

ターミナル

$ xmodmap -e 'add mod3 = Scroll_Lock'

Note
VMが再起動された場合は、同じコマンドを再度発行する必要があります。

2. 解決策–シェルスクリプト+自動起動

永続的な解決策は、シェルスクリプトを作成し、その自動起動を設定することです。

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

ターミナル

$ 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.

ターミナル

$ 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

完了しました。 VMを再起動します。