private void SendColorsToKeyboard(bool forced = false)
 {
     if ((!Enumerable.SequenceEqual(keyboard.GetLeds().ToArray(), previous_bitmap) || forced) && keyboard != null)
     {
         keyboard.Update();
         previous_bitmap  = keyboard.GetLeds().ToArray();
         keyboard_updated = true;
     }
 }
Ejemplo n.º 2
0
        public ListLedGroup AddFlashyKeysGroup()
        {
            ListLedGroup group = AddGroup(Keyboard.GetLeds());

            group.RemoveLed(CorsairLedId.Brightness, CorsairLedId.WinLock, CorsairLedId.Mute, CorsairLedId.CapsLock,
                            CorsairLedId.Stop, CorsairLedId.ScanPreviousTrack, CorsairLedId.PlayPause, CorsairLedId.ScanNextTrack,
                            CorsairLedId.LeftShift, CorsairLedId.LeftCtrl, CorsairLedId.LeftGui, CorsairLedId.LeftAlt,
                            CorsairLedId.RightShift, CorsairLedId.RightCtrl, CorsairLedId.RightGui, CorsairLedId.RightAlt);
            return(group);
        }
Ejemplo n.º 3
0
        public static void SetColorToAllKeys(CorsairColor color)
        {
            var leds = Keyboard.GetLeds();

            foreach (var corsairLed in leds)
            {
                corsairLed.Color = color;
            }
            Keyboard.Update();
        }
Ejemplo n.º 4
0
 public void SetColor(RgbColor color)
 {
     // Keyboard
     CueSDK.KeyboardSDK.Brush = (SolidColorBrush)color.GetColor();
     foreach (var corsairLed in _keyboard.GetLeds())
     {
         corsairLed.Color = color.GetColor();
     }
     _keyboard.Update();
     // TODO: Mouse, Mousepad, and headset
 }