public override PadToKey SetupCustomPadToKeyMapping(PadToKey mapping) { if (string.IsNullOrEmpty(_exename)) { return(mapping); } if (Program.Controllers.Count(c => c.Config != null && c.Config.DeviceName != "Keyboard") == 0) { return(mapping); } if (mapping == null) { mapping = new PadToKeyboard.PadToKey(); } var app = new PadToKeyApp(); app.Name = _exename; PadToKeyInput mouseInput = new PadToKeyInput(); mouseInput.Name = InputKey.hotkey | InputKey.start; mouseInput.Type = PadToKeyType.Keyboard; mouseInput.Key = "(%{KILL})"; app.Input.Add(mouseInput); mapping.Applications.Add(app); return(mapping); }
public static PadToKey Load(string xmlFile) { if (!File.Exists(xmlFile)) { return(null); } try { PadToKey ret = Misc.FromXml <PadToKey>(xmlFile); if (ret != null) { return(ret); } } catch (Exception ex) { #if DEBUG MessageBox.Show(ex.Message); #endif SimpleLogger.Instance.Error("PadToKey error : " + ex.Message); } return(null); }
public JoystickListener(Controller[] inputList, PadToKey mapping) { bool joy2Key = Process.GetProcessesByName("JoyToKey").Length > 0; if (joy2Key) { return; } _inputList = inputList; _mapping = mapping; if (_mapping != null && _inputList != null && _inputList.Length > 0) { _waitHandle = new AutoResetEvent(false); Start(); } }
public virtual PadToKey SetupCustomPadToKeyMapping(PadToKeyboard.PadToKey mapping) { return(mapping); }