public void Map(ButtonTrigger trigger, GamepadInputCallback callback) { if (!Bindings.ContainsKey(trigger.Name)) { GamepadBinding binding = new GamepadBinding(trigger.Name); Bindings.Add(trigger.Name, binding); Bindings[trigger.Name].AddAction(callback); } Buttons[] buttons = new Buttons[1 + trigger.AlternateButtons.Length]; buttons[0] = trigger.Button; for (int i = 0, j = 1; i < trigger.AlternateButtons.Length; i++, j++) { buttons[j] = trigger.AlternateButtons[i]; } buttonBinds.Add(trigger.Name, buttons); }