OS X: CM Storm Devastator keyboard doesn't light up
Solution 1:
I have created a fork of the apple LED test script specifically to turn on and off the LED Backlight on cmstorm keyboards. This should also work for anyone who needs to turn on scroll lock on their external keyboards (which is the backlight key for most keyboards).
To use it:
-
Download the binary and install it in your Applications folder
wget https://github.com/pykler/led-backlight-osx/blob/master/led-backlight-osx?raw=true -O led-backlight-osx chmod +x led-backlight-osx mv led-backlight-osx /Applications
-
Then you can either
-
run it on the terminal like so
/Applications/led-backlight-osx # turns the backlight on /Applications/led-backlight-osx off # turns the backlight off
-
OR use an automator script as described in the following answer. Replace the automator script in step 11 with the following.
```/Applications/led-backlight-osx```
-
to create a script to turn it off create another automator script with the following
/Applications/led-backlight-osx off
-
The details for the automator script are in the edit below.
-
EDIT: to add this as a keyboard shortcut you must use Automator as in @AlexanderTaylor's answer, in summary:
-
Launch "Automator" from either Launchpad or Finder/Applications
-
Choose "Service" type (For Catalina, first choose "Quick Actions" on "New")
-
(On the left) "Library" -> "Utilities", drag "Run Shell Script" to the workflow pane.
-
At the top of the workflow pan, choose "no input" in "any application"
-
For "pass input" choose "as arguments"
-
For "shell" choose "/bin/sh"
-
Paste in this script:
/Applications/led-backlight-osx
-
Click "File" -> "Save", save it as "CMStormLedOn"
-
Go to System Preferences -> Keyboard -> Shortcuts -> Services -> CMStormLedOn and click on the shortcut ⌘+ScrLk. (it will show up as ⌘+F14)
Done. Now typing ⌘+ScrLk should turn those LEDs on.
Solution 2:
Summary: solve by downloading Apple's keyboard LED test tool, which tests keyboard lights by enabling scroll lock, num lock and caps lock. Make a keyboard shortcut that runs a script that runs the LED test tool and terminates the script while scroll lock is on.
- Go here: https://developer.apple.com/library/mac/samplecode/HID_LED_test_tool/Introduction/Intro.html
- Click the little "Download sample code" button
- Open the downloaded folder and go to Build / Release
- Drag the HID LED test tool file to your Applications folder
- Launch the OS X "Automator" program
- Choose "Service" document type
- Under "Library", click "Utilities", and drag "Run Shell Script" to the blank area / workflow pane.
- For "selected service receives" choose "no input" in "any application" (important)
- For "pass input" choose "as arguments" (important)
- For "shell" choose "/bin/bash"
-
Paste in this script:
/Applications/HID\ LED\ test\ tool & pid=$! sleep 3 kill $pid
Click "run" to test. After 3 seconds, your keyboard should remain in a state with num lock and scroll lock enabled, and all the keys should be lit up. Yay! Continue to assign keyboard shortcut to do this.
- Click "File" > "Save", "Save service as" : "Devastator LED Lighter"
- Go to System Preferences > Keyboard > Shortcuts > Services > General > "Devastator LED Lighter"
- Assign a shortcut. Scroll lock and F keys didn't work for me. I ended up choosing ⌘ Command+1.
You're done!
Try your shortcut. If nothing happens, test by clicking "Play" in the automator if you skipped that part. If that doesn't work, the bash script may need to be updated, or maybe the path to the LED test tool is wrong. Then double check steps 8 and 9. Lastly, try making an automator document that does a "Launch Application" command instead of a bash script, and see if you can get any program at all to launch, such as TextEdit, using a keyboard shortcut.