Corsair RGB Keyboard and Mousepad turn lights off when Samsung monitor is turned off
-
Hello.
I am using the highlighted code to turn off my Samsung U28E590D monitor and I have an incompatibility problem with my K95 keyboard and M800 RGB Corsair mousepad. Both have updated firmware and my Corsair iCUE application is also updated. The version of TRIGGERcmd is the 1.0.25.0. It turns out that when I apply the command to turn off, the RGB lights on my equipment turn off. Could you give me another code or would you know the cause to solve the problem? Thanks.
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
-
You should try this one instead:
(Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
Or, you can use a Powershell script like this:
Add-Type -TypeDefinition ' using System; using System.Runtime.InteropServices; namespace Utilities { public static class Display { [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern IntPtr SendMessage( IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam ); public static void PowerOff () { SendMessage( (IntPtr)0xffff, // HWND_BROADCAST 0x0112, // WM_SYSCOMMAND (IntPtr)0xf170, // SC_MONITORPOWER (IntPtr)0x0002 // POWER_OFF ); } } } ' [Utilities.Display]::PowerOff()
-
@Russ Hello. Could you please help me with this question? The first code didn't work. The second, where you indicate the creation of a .ps1 script, I can run it through the powershell terminal, it runs, but the RGB lights on my keyboard and mousepad are turned off again. Do you have any idea what it might be?
-
@hdegenaro, I don't have that Corsair RGB keyboard hardware or mousepad, so I can't test/troubleshoot that script.
If the script works fine if you run it from a Powershell window I can probably help make it work from the TRIGGERcmd agent.
-
@Russ Good morning, thanks for the return. The script that I put on the first line, works perfectly. It just turns off the lights on my keyboard and mouse. Can you help me?