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:

  1. 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
    
  2. Then you can either

  3. run it on the terminal like so

       /Applications/led-backlight-osx # turns the backlight on
       /Applications/led-backlight-osx off # turns the backlight off
    
  4. 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:

  1. Launch "Automator" from either Launchpad or Finder/Applications

  2. Choose "Service" type (For Catalina, first choose "Quick Actions" on "New")

  3. (On the left) "Library" -> "Utilities", drag "Run Shell Script" to the workflow pane.

  4. At the top of the workflow pan, choose "no input" in "any application"

  5. For "pass input" choose "as arguments"

  6. For "shell" choose "/bin/sh"

  7. Paste in this script:

     /Applications/led-backlight-osx
    
  8. Click "File" -> "Save", save it as "CMStormLedOn"

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

  1. Go here: https://developer.apple.com/library/mac/samplecode/HID_LED_test_tool/Introduction/Intro.html
  2. Click the little "Download sample code" button
  3. Open the downloaded folder and go to Build / Release
  4. Drag the HID LED test tool file to your Applications folder
  5. Launch the OS X "Automator" program
  6. Choose "Service" document type
  7. Under "Library", click "Utilities", and drag "Run Shell Script" to the blank area / workflow pane.
  8. For "selected service receives" choose "no input" in "any application" (important)
  9. For "pass input" choose "as arguments" (important)
  10. For "shell" choose "/bin/bash"
  11. Paste in this script:

    /Applications/HID\ LED\ test\ tool &
    pid=$!
    sleep 3
    kill $pid
    
  12. 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.

  13. Click "File" > "Save", "Save service as" : "Devastator LED Lighter"
  14. Go to System Preferences > Keyboard > Shortcuts > Services > General > "Devastator LED Lighter"
  15. 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.