Changing Keyboad Backlight Color

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
WizardM
Posts: 43
Joined: 18 Mar 2023, 23:08

Changing Keyboad Backlight Color

Post by WizardM » 20 Mar 2023, 17:31

I own a SteelSeries Apex 3 TKL keyboard. It has RGB backlighting. By default without keyboard software runing it cycles through a series of colors.

I am in the process of doing away with the bloated unreliable steelseries software. Being a total noob at this I had a lot of help from the community here and managed to set up so far 4 keyboard profiles. At first I though of puting some sort of profile indicator in the tray but after thinking about it, it might be better to try to assign a keyboard backlight color to each profile. So all I really need is the code for assigning backlight color and I should be able to just insert it into the relevant keyboard profile #HotIf section of the script. Is this possible? If not then I guess Im back to thinking about a profile indicator in the tray.

i searched the forum and googled but found mostly stuff on scroll and caps lock led light control. If my wish is at all possible, I kind of feel somebody must have already done something like this even though I couldnt find it. Appreciate if U could advise on how or at least point me to a thread where its already been discussed.

User avatar
mikeyww
Posts: 26600
Joined: 09 Sep 2014, 18:38

Re: Changing Keyboad Backlight Color

Post by mikeyww » 20 Mar 2023, 19:11

Hello,

Just one idea here, but if you have a special keyboard with a user-configurable backlight, you might want to refer to the instructions or contact the manufacturer, to learn how to configure the light. If that is done with a hotkey, command line, key sequence, etc., then AHK might be able to replicate the right series of actions.

User avatar
WizardM
Posts: 43
Joined: 18 Mar 2023, 23:08

Re: Changing Keyboad Backlight Color

Post by WizardM » 20 Mar 2023, 20:19

I contacted the manufacturer before several times, over an issue of auto profile switching not working and it was a pretty frustrating experience. Lost the will to even try to talk to them. Thats one of the reasons why I moved to Autohotkey keyboard profiles.

In any case its a SteelSeries Apex 3 TKL keyboard with user cofigurable backlighting through their 560MB steelseries GG software.The engine that does the configuration is maybe a couple % that bloat. The rest is adds, marketing and other BS that nobody needs but they shove it down ones throat anyway. Also the reason Im moving ove to Autohotkey.

Im not aware of any hotkey, command line, key sequence, etc. way to modify the backlighting. Only way I know is thrrough that bloat software. It devides the keyboard in 8 zones which can be backlighted separately with different modes of lighting. I added a screenshot of the configuration screen. Wish I could say more.
https://photos.app.goo.gl/Bbs8DFxL3iYsyqz6A

User avatar
mikeyww
Posts: 26600
Joined: 09 Sep 2014, 18:38

Re: Changing Keyboad Backlight Color

Post by mikeyww » 20 Mar 2023, 20:30

I found two other threads about the keyboard. Although the posts might not hold the answer, the authors might know the answer. You could ask them or reply to the posts there. @evilC

User avatar
WizardM
Posts: 43
Joined: 18 Mar 2023, 23:08

Re: Changing Keyboad Backlight Color

Post by WizardM » 20 Mar 2023, 21:27

thnx for taking the time to deal with this.

@evilC
As suggested above by mikeyww, hope U might have a suggestion on how to assign keyboard backlighting colors to indicate which #HotIf profile is active. Even some other unobtrusive way of indicating which #HotIf is active would be good. I do though prefer to deal with it through keyboard backlighting to get away from my not favorite pulsating/cycling keyboard colors. Hopefully I can just plug something into a script like the one below.

Code: Select all

#Requires AutoHotkey v2.0

#HotIf WinActive("ahk_class Notepad")
$F10::SendText("Hi, this is a F10 SendText for Text processing")
$F11::SendText("Hi, this is also a F11 SendText for Text processing")
$F12::SendText("Hi, this is an extra F12 test of SendText for Text processing")

#HotIf WinActive("ahk_exe Excel.exe")
$F10::SendText("Hi, this is a F10 test of SendText for Excel")
$F11::SendText("Hi, this is also a F11 test SendText for Excel")
$F12::SendText("Hi, this is an extra F12 test of SendText for Excel")

#HotIf WinActive("ahk_exe Discord.exe")
$F10::SendText("Hi, this is a F10 test of SendText for Discord Social Communication")
$F11::SendText("Hi, this is also a F11 test SendText for Discord Social Communication")
$F12::SendText("Hi, this is an extra F12 test of SendText for Discord Social Communication")

#HotIf WinActive("ahk_exe ApplicationFrameHost.exe")
t::1
g::2
d::3
e::4
$f::Send("{f down}"), Sleep(20), Send("{f up}"), Sleep(20), Send("{f down}"), Sleep(20), Send("{f up}"), Sleep(20), Send("{f down}"), Sleep(20), Send("{f up}"), Sleep(20), Send("{r down}"), Sleep(20), Send("{r up}"), Sleep(20), Send("{r down}"), Sleep(20), Send("{r up}"), Sleep(20), Send("{r down}"), Sleep(20), Send("{r up}"), Sleep(20) ; jump and reload macro


User avatar
WizardM
Posts: 43
Joined: 18 Mar 2023, 23:08

Re: Changing Keyboad Backlight Color

Post by WizardM » 21 Mar 2023, 05:24

@swagfag
im not sure i understand correctly but seems like ur suggesting to set it up to have the keyboard respond to game events. This is not what I want. Im actually trying to get away from steelseries GG software. i have it installed and want to uninstall but would like to still be able to use some very basic features of the keyboard. That basic feature being a steady different backlight color for every keyboard profile i use.

If im making the wrong asumption here please let me know and I have no issue going through all of the above if it results in what I am after.

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Changing Keyboad Backlight Color

Post by swagfag » 21 Mar 2023, 08:19

  1. ur keyboard has a chip in it
  2. that chip controls, among other things, the lighting
  3. SteelSeries Engine is a program created by ur keyboard's vendor
  4. the program has the capability of "talking" to the keyboard
  5. the program also has the capability of "talking" (well, "listening", more like, really) to other programs running on ur computer (such as an ahk script) that send it specific "messages" it happens to understand (this whole JSON webrequest rigamarole)
  6. the program then has the capability of "instructing" ur keyboard what to do in response to those "messages"
fact: u want to control ur keyboard's lighting from an ahk script. then its clear what u must do: send this SteelSeries Engine program the appropriate messages, in response to whatever is going on in ur ahk script

u dont want to use SteelSeries Engine? too bad. u can cry to ur vendor's support email and tell them to write a DLL instead for interfacing with their products(which is something they wont do because they want ur data and to show u ads, but thats neither here nor there)

alternative solution(for megaexperts):
  • run Wireshark USBPCAP
  • change some LED settings in the app
  • capture the sent data packets
  • reverse-engineer their communication protocol
  • send ur own crafted USB packets to control the lighting

User avatar
WizardM
Posts: 43
Joined: 18 Mar 2023, 23:08

Re: Changing Keyboad Backlight Color

Post by WizardM » 21 Mar 2023, 18:07

@swagfag
Thanx for the explanation, very much appreciated.

Im a far cry from a megaexpert so seems like im stuck with the manufacturer bloatware if I want to manage the lighting. At least I can have the keyboard layout profiles in AHK. For a few days now I turned off the steelseries GG software and the result seems a bit more reliable and easier to edit. Only the contantly breathing and cycling of colors is a bit annoying but I guess I'll get used to it.

Post Reply

Return to “Ask for Help (v2)”