• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Corsair RGB Keyboard and Mousepad turn lights off when Samsung monitor is turned off

General Discussion
3
5
453
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    hdegenaro
    last edited by hdegenaro Feb 25, 2021, 1:42 AM Feb 25, 2021, 1:38 AM

    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)
    
    1 Reply Last reply Reply Quote 0
    • L
      Luis Gustavo
      last edited by Luis Gustavo Feb 25, 2021, 2:56 PM Feb 25, 2021, 2:47 PM

      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()
      H 1 Reply Last reply Feb 25, 2021, 3:43 PM Reply Quote 0
      • H
        hdegenaro @Luis Gustavo
        last edited by hdegenaro Feb 28, 2021, 2:51 PM Feb 25, 2021, 3:43 PM

        @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?

        R 1 Reply Last reply Feb 28, 2021, 5:03 PM Reply Quote 0
        • R
          Russ @hdegenaro
          last edited by Feb 28, 2021, 5:03 PM

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

          Russell VanderMey

          H 1 Reply Last reply Mar 1, 2021, 12:18 PM Reply Quote 0
          • H
            hdegenaro @Russ
            last edited by Mar 1, 2021, 12:18 PM

            @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?

            1 Reply Last reply Reply Quote 0
            3 out of 5
            • First post
              3/5
              Last post