public static void Main(string[] args) { Console.WriteLine("Press any key to exit ..."); Console.WriteLine(); Task.Factory.StartNew( () => { Console.ReadKey(); Environment.Exit(0); }); try { // Initialize CUE-SDK CueSDK.Initialize(); Console.WriteLine("Initialized with " + CueSDK.LoadedArchitecture + "-SDK"); CueSDK.KeyboardSDK.Brush = new LinearGradientBrush(new RainbowGradient()) { Brightness = 0.125f }; CueSDK.UpdateMode = UpdateMode.Continuous; IBrush highlightBrushColor = new LinearGradientBrush(new RainbowGradient()); highlightBrushColor.AddEffect(new ReactiveTypingEffect(CueSDK.KeyboardSDK) { DecayTime = 2f }); ListLedGroup highlightGroupColor = new ListLedGroup(CueSDK.KeyboardSDK, CueSDK.KeyboardSDK) { Brush = highlightBrushColor }; IBrush highlightBrushFlash = (SolidColorBrush)Color.White; highlightBrushFlash.AddEffect(new ReactiveTypingEffect(CueSDK.KeyboardSDK) { DecayTime = 0.33f }); ListLedGroup highlightGroupFlash = new ListLedGroup(CueSDK.KeyboardSDK, CueSDK.KeyboardSDK) { Brush = highlightBrushFlash }; } catch (CUEException ex) { Console.WriteLine("CUE Exception! ErrorCode: " + Enum.GetName(typeof(CorsairError), ex.Error)); } catch (WrapperException ex) { Console.WriteLine("Wrapper Exception! Message:" + ex.Message); } catch (Exception ex) { Console.WriteLine("Exception! Message:" + ex.Message); } while (true) { Thread.Sleep(1000); // Don't exit after exception } }