public static List <KeyValuePair <InputWrapper, KeyValuePair <int, string> > > EnumerateAllControllers() { List <KeyValuePair <InputWrapper, KeyValuePair <int, string> > > controllers = new List <KeyValuePair <InputWrapper, KeyValuePair <int, string> > >(); if (Utility.CheckXInputSupport()) { #if !LINUX foreach (var controllerName in XInputController.EnumerateControllers()) { controllers.Add(new KeyValuePair <InputWrapper, KeyValuePair <int, string> >(InputWrapper.XInput, controllerName)); } #endif } if (Utility.CheckSDLSupport()) { foreach (var controllerName in SDLController.EnumerateControllers()) { controllers.Add(new KeyValuePair <InputWrapper, KeyValuePair <int, string> >(InputWrapper.SDL, controllerName)); } } controllers.Add(new KeyValuePair <InputWrapper, KeyValuePair <int, string> >(InputWrapper.KeyboardMouse, new KeyValuePair <int, string>(0, "Keyboard & Mouse"))); return(controllers); }
private void Update() { SDLController.SDLUpdateState(); if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ActiveVessel != null) { if (TimeWarp.fetch != null && TimeWarp.fetch.Mode == TimeWarp.Modes.HIGH && TimeWarp.CurrentRateIndex != 0) { m_FlightManager.OnFlyByWire(new FlightCtrlState()); } } if (Input.GetKey("left shift") && Input.GetKey("l")) { m_UIActive = true; } }