using Otter;

namespace PpbbffttMiningHa.entities.Controllers
{
    class SetControllerInputs
    {
        /* we're making a method here, not a class*/
        public static void SetController(Session app, Session pp)
        {
            string temp = "";
            string jn = "";
            #region SetPlayer1Controller
            //first thing to do is update the Controller collection with the proper saved controller settings? right? or am i thinking about this too hard?
            //so i can save the string version of the key.
            Controllers.PlayerOneKeys.TryGetValue("P1JoystickNumber", out string defaults);
            jn = app.Data.GetStringOrDefault("P1JoystickNumber", defaults);

            Controllers.PlayerOneKeys.TryGetValue("P1Start", out defaults);//grab default value for player1.
            temp = app.Data.GetStringOrDefault("P1Start", defaults);//if this is not set, use defaults. this should return the string of what the key is.
            app.Controller.AddButton("P1Start");//Set player1start button
            if (temp.Contains("Key"))
                app.Controller.Button("P1Start").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));//convert string to int to key);
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Start").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Start").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Mute", out defaults);
            temp = app.Data.GetStringOrDefault("P1Mute", defaults);
            app.Controller.AddButton("P1Mute");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Mute").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Mute").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Mute").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Testing", out defaults);
            temp = app.Data.GetStringOrDefault("P1Testing", defaults);
            app.Controller.AddButton("P1Testing");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Testing").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Testing").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Testing2", out defaults);
            temp = app.Data.GetStringOrDefault("P1Testing2", defaults);
            app.Controller.AddButton("P1Testing2");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Testing2").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Testing2").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Testing2").AddButton(Global.xBoxController4.PovUp);
                }
            }
            //p1 main movement fire and jump
            Controllers.PlayerOneKeys.TryGetValue("P1Up", out defaults);
            temp = app.Data.GetStringOrDefault("P1Up", defaults);
            app.Controller.AddButton("P1Up");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Up").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Up").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Up").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Left", out defaults);
            temp = app.Data.GetStringOrDefault("P1Left", defaults);
            app.Controller.AddButton("P1Left");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Left").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Left").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Left").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Down", out defaults);
            temp = app.Data.GetStringOrDefault("P1Down", defaults);
            app.Controller.AddButton("P1Down");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Down").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Down").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Down").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Right", out defaults);
            temp = app.Data.GetStringOrDefault("P1Right", defaults);
            app.Controller.AddButton("P1Right");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Right").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Right").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Right").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Jump", out defaults);
            temp = app.Data.GetStringOrDefault("P1Jump", defaults);
            app.Controller.AddButton("P1Jump");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Jump").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Jump").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Jump").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Fire", out defaults);
            temp = app.Data.GetStringOrDefault("P1Fire", defaults);
            app.Controller.AddButton("P1Fire");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Fire").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Fire").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Fire").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PlayerOneKeys.TryGetValue("P1Escape", out defaults);
            temp = app.Data.GetStringOrDefault("P1Escape", defaults);
            app.Controller.AddButton("P1Escape");
            if (temp.Contains("Key"))
                app.Controller.Button("P1Escape").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                app.Controller.Button("P1Escape").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        app.Controller.Button("P1Escape").AddButton(Global.xBoxController4.PovUp);
                }
            }
            #endregion
            #region SetPausePersonController
            Controllers.PausePersonKeys.TryGetValue("PPJoystickNumber", out defaults);
            jn = pp.Data.GetStringOrDefault("PPJoystickNumber", defaults);
            //first thing to do is update the Controller collection with the proper saved controller settings? right? or am i thinking about this too hard?
            //so i can save the string version of the key.
            Controllers.PausePersonKeys.TryGetValue("PPStart", out defaults);//grab default value for player1.
            temp = pp.Data.GetStringOrDefault("PPStart", defaults);//if this is not set, use defaults. this should return the string of what the key is.
            pp.Controller.AddButton("PPStart");//Set player1start button
            if (temp.Contains("Key"))
                pp.Controller.Button("PPStart").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));//convert string to int to key);
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPStart").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPStart").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPMute", out defaults);
            temp = pp.Data.GetStringOrDefault("PPMute", defaults);
            pp.Controller.AddButton("PPMute");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPMute").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPMute").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPMute").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPTesting", out defaults);
            temp = pp.Data.GetStringOrDefault("PPTesting", defaults);
            pp.Controller.AddButton("PPTesting");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPTesting").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPTesting").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPTesting2", out defaults);
            temp = pp.Data.GetStringOrDefault("PPTesting2", defaults);
            pp.Controller.AddButton("PPTesting2");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPTesting2").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPTesting2").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPTesting2").AddButton(Global.xBoxController4.PovUp);
                }
            }
            //PP main movement fire and jump
            Controllers.PausePersonKeys.TryGetValue("PPUp", out defaults);
            temp = pp.Data.GetStringOrDefault("PPUp", defaults);
            pp.Controller.AddButton("PPUp");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPUp").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPUp").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPUp").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPLeft", out defaults);
            temp = pp.Data.GetStringOrDefault("PPLeft", defaults);
            pp.Controller.AddButton("PPLeft");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPLeft").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPLeft").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPLeft").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPDown", out defaults);
            temp = pp.Data.GetStringOrDefault("PPDown", defaults);
            pp.Controller.AddButton("PPDown");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPDown").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPDown").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPDown").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPRight", out defaults);
            temp = pp.Data.GetStringOrDefault("PPRight", defaults);
            pp.Controller.AddButton("PPRight");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPRight").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPRight").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPRight").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPJump", out defaults);
            temp = pp.Data.GetStringOrDefault("PPJump", defaults);
            pp.Controller.AddButton("PPJump");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPJump").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPJump").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPJump").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPFire", out defaults);
            temp = pp.Data.GetStringOrDefault("PPFire", defaults);
            pp.Controller.AddButton("PPFire");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPFire").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPFire").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPFire").AddButton(Global.xBoxController4.PovUp);
                }
            }

            Controllers.PausePersonKeys.TryGetValue("PPEscape", out defaults);
            temp = pp.Data.GetStringOrDefault("PPEscape", defaults);
            pp.Controller.AddButton("PPEscape");
            if (temp.Contains("Key"))
                pp.Controller.Button("PPEscape").AddKey((Key)Controllers.TranslateInputKeysForInts(temp));
            else if (temp.Contains("MouseButton"))
                pp.Controller.Button("PPEscape").AddMouseButton((MouseButton)Controllers.TranslateInputKeysForInts(temp));//convert string to int to mousebutton);
            else if (temp.Contains("JoyButton"))//this needs more translation to be correctly assigned to the controller!
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Button15);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Button15);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Button15);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyButtonA")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.A);
                    if (temp == "JoyButtonB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.B);
                    if (temp == "JoyButtonX")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.X);
                    if (temp == "JoyButtonY")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Y);
                    if (temp == "JoyButtonLB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LB);
                    if (temp == "JoyButtonRB")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RB);
                    if (temp == "JoyButtonBack")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Back);
                    if (temp == "JoyButtonStart")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Start);
                    if (temp == "JoyButtonLSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LeftStickClick);
                    if (temp == "JoyButtonRSC")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RightStickClick);
                    if (temp == "JoyButton10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button10);
                    if (temp == "JoyButton11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button11);
                    if (temp == "JoyButton12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button12);
                    if (temp == "JoyButton13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button13);
                    if (temp == "JoyButton14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button14);
                    if (temp == "JoyButton15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Button15);
                }
            }
            else if (temp.Contains("JoyAxis"))
            {
                if (jn == "0")
                {
                    if (Global.xBoxController == null)
                        Global.xBoxController = new ControllerXbox360(0);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController.PovUp);
                }
                else if (jn == "1")
                {
                    if (Global.xBoxController2 == null)
                        Global.xBoxController2 = new ControllerXbox360(1);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController2.PovUp);
                }
                else if (jn == "2")
                {
                    if (Global.xBoxController3 == null)
                        Global.xBoxController3 = new ControllerXbox360(2);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController3.PovUp);
                }
                else if (jn == "3")
                {
                    if (Global.xBoxController4 == null)
                        Global.xBoxController4 = new ControllerXbox360(3);//what controller to pick
                    if (temp == "JoyAxis0")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RSRight);
                    if (temp == "JoyAxis1")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RSLeft);
                    if (temp == "JoyAxis2")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RSDown);
                    if (temp == "JoyAxis3")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RSUp);
                    if (temp == "JoyAxis4")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LT);
                    if (temp == "JoyAxis5")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.RT);
                    if (temp == "JoyAxis6")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LSRight);
                    if (temp == "JoyAxis7")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LSLeft);
                    if (temp == "JoyAxis8")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LSDown);
                    if (temp == "JoyAxis9")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.LSUp);
                    if (temp == "JoyAxis10")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Vlt);
                    if (temp == "JoyAxis11")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.Vrt);
                    if (temp == "JoyAxis12")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.PovRight);
                    if (temp == "JoyAxis13")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.PovLeft);
                    if (temp == "JoyAxis14")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.PovDown);
                    if (temp == "JoyAxis15")
                        pp.Controller.Button("PPEscape").AddButton(Global.xBoxController4.PovUp);
                }
            }
            #endregion
        }
    }
}
