public InputDeviceProfile()
		{
			Name = "";
			Meta = "";

			AnalogMappings = new InputControlMapping[0];
			ButtonMappings = new InputControlMapping[0];

			SupportedPlatforms = new string[0];

			MinUnityVersion = new VersionInfo( 3, 0, 0, 0 );
			MaxUnityVersion = new VersionInfo( 9, 0, 0, 0 );
		}
		public UnityInputDeviceProfile()
		{
			Name = "";
			Meta = "";

			sensitivity = 1.0f;
			lowerDeadZone = 0.2f;
			upperDeadZone = 0.9f;

			AnalogMappings = new InputControlMapping[0];
			ButtonMappings = new InputControlMapping[0];

			MinUnityVersion = new VersionInfo( 3 );
			MaxUnityVersion = new VersionInfo( 9 );
		}
Exemple #3
0
        public OuyaLinuxProfile()
        {
            Name = "OUYA Controller";
            Meta = "OUYA Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "OUYA Game Controller"
            };

            MaxUnityVersion = new VersionInfo(4, 9);

            LowerDeadZone = 0.3f;

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "O",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action2,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "U",
                    Target = InputControlType.Action3,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = KeyCodeButton(KeyCode.Menu)
                },
                new InputControlMapping {
                    Handle = "TouchPad Tap",
                    Target = InputControlType.TouchPadTap,
                    Source = MouseButton0
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button10,
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button11,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button8,
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button9,
                },
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = Analog3
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = Analog4,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
                new InputControlMapping {
                    Handle = "TouchPad X Axis",
                    Target = InputControlType.TouchPadXAxis,
                    Source = MouseXAxis,
                    Raw    = true
                },
                new InputControlMapping {
                    Handle = "TouchPad Y Axis",
                    Target = InputControlType.TouchPadYAxis,
                    Source = MouseYAxis,
                    Raw    = true
                }
            };
        }
Exemple #4
0
        public LogitechF310LinuxProfile()
        {
            Name = "Logitech F310 Controller";
            Meta = "Logitech F310 Controller on Linux";

            IncludePlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Logitech Gamepad F310"
            };

            MaxUnityVersion = new VersionInfo(4, 9, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = Button6
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog3),
                RightStickRightMapping(Analog3),
                RightStickUpMapping(Analog4),
                RightStickDownMapping(Analog4),

                DPadLeftMapping(Analog6),
                DPadRightMapping(Analog6),
                DPadUpMapping(Analog7),
                DPadDownMapping(Analog7),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
            };
        }
        public MogaProLinuxProfile()
        {
            Name = "MOGA Pro";
            Meta = "MOGA Pro on Linux";

            SupportedPlatforms = new[] {
                "Linux",
            };

            JoystickNames = new[] {
                "Moga Pro HID",
            };

            MaxUnityVersion = new VersionInfo(4, 9, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button6
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog2),
                RightStickRightMapping(Analog2),
                RightStickUpMapping(Analog3),
                RightStickDownMapping(Analog3),

                DPadLeftMapping(Analog6),
                DPadRightMapping(Analog6),
                DPadUpMapping(Analog7),
                DPadDownMapping(Analog7),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog5,
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog4
                }
            };
        }
        public PlayStation3LinuxProfile()
        {
            Name = "PlayStation 3 Controller";
            Meta = "PlayStation 3 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Sony PLAYSTATION(R)3 Controller",
                "SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller" // Not a typo.
            };

            MaxUnityVersion = new VersionInfo( 4, 9 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "Cross",
                    Target = InputControlTarget.Action1,
                    Source = Button14
                },
                new InputControlMapping {
                    Handle = "Circle",
                    Target = InputControlTarget.Action2,
                    Source = Button13
                },
                new InputControlMapping {
                    Handle = "Square",
                    Target = InputControlTarget.Action3,
                    Source = Button15
                },
                new InputControlMapping {
                    Handle = "Triangle",
                    Target = InputControlTarget.Action4,
                    Source = Button12
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlTarget.DPadUp,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlTarget.DPadDown,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlTarget.DPadLeft,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlTarget.DPadRight,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlTarget.LeftBumper,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlTarget.RightBumper,
                    Source = Button11
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlTarget.Start,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Select",
                    Target = InputControlTarget.Select,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlTarget.LeftTrigger,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlTarget.RightTrigger,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlTarget.LeftStickButton,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlTarget.RightStickButton,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "System",
                    Target = InputControlTarget.System,
                    Source = Button16
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlTarget.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlTarget.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlTarget.RightStickX,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlTarget.RightStickY,
                    Source = Analog3,
                    Invert = true
                }
            };
        }
		public MogaProLinuxProfile()
		{
			Name = "MOGA Pro";
			Meta = "MOGA Pro on Linux";

			SupportedPlatforms = new[] {
				"Linux",
			};

			JoystickNames = new[] {
				"Moga Pro HID",
			};

			MaxUnityVersion = new VersionInfo( 4, 9 );

			ButtonMappings = new[] {
				new InputControlMapping {
					Handle = "A",
					Target = InputControlType.Action1,
					Source = Button0
				},
				new InputControlMapping {
					Handle = "B",
					Target = InputControlType.Action2,
					Source = Button1
				},
				new InputControlMapping {
					Handle = "X",
					Target = InputControlType.Action3,
					Source = Button2
				},
				new InputControlMapping {
					Handle = "Y",
					Target = InputControlType.Action4,
					Source = Button3
				},
				new InputControlMapping {
					Handle = "Left Bumper",
					Target = InputControlType.LeftBumper,
					Source = Button4
				},
				new InputControlMapping {
					Handle = "Right Bumper",
					Target = InputControlType.RightBumper,
					Source = Button5
				},
				new InputControlMapping {
					Handle = "Left Stick Button",
					Target = InputControlType.LeftStickButton,
					Source = Button7
				},
				new InputControlMapping {
					Handle = "Right Stick Button",
					Target = InputControlType.RightStickButton,
					Source = Button8
				},
				new InputControlMapping {
					Handle = "Start",
					Target = InputControlType.Start,
					Source = Button6
				}
			};

			AnalogMappings = new[] {
				new InputControlMapping {
					Handle = "Left Stick X",
					Target = InputControlType.LeftStickX,
					Source = Analog0,
				},
				new InputControlMapping {
					Handle = "Left Stick Y",
					Target = InputControlType.LeftStickY,
					Source = Analog1,
					Invert = true
				},
				new InputControlMapping {
					Handle = "Right Stick X",
					Target = InputControlType.RightStickX,
					Source = Analog2
				},
				new InputControlMapping {
					Handle = "Right Stick Y",
					Target = InputControlType.RightStickY,
					Source = Analog3,
					Invert = true
				},
				new InputControlMapping {
					Handle = "DPad Left",
					Target = InputControlType.DPadLeft,
					Source = Analog6,
					SourceRange = InputControlMapping.Range.Negative,
					TargetRange = InputControlMapping.Range.Negative,
					Invert = true
				},
				new InputControlMapping {
					Handle = "DPad Right",
					Target = InputControlType.DPadRight,
					Source = Analog6,
					SourceRange = InputControlMapping.Range.Positive,
					TargetRange = InputControlMapping.Range.Positive
				},
				new InputControlMapping {
					Handle = "DPad Up",
					Target = InputControlType.DPadUp,
					Source = Analog7,
					SourceRange = InputControlMapping.Range.Negative,
					TargetRange = InputControlMapping.Range.Negative,
					Invert = true

				},
				new InputControlMapping {
					Handle = "DPad Down",
					Target = InputControlType.DPadDown,
					Source = Analog7,
					SourceRange = InputControlMapping.Range.Positive,
					TargetRange = InputControlMapping.Range.Positive
				},
				new InputControlMapping {
					Handle = "Left Trigger",
					Target = InputControlType.LeftTrigger,
					Source = Analog5,
				},
				new InputControlMapping {
					Handle = "Right Trigger",
					Target = InputControlType.RightTrigger,
					Source = Analog4
				}
			};
		}
        public GenericLinuxProfile()
        {
            Name = "Generic Controller";
            Meta = "Generic Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickRegex = new[] {
                "."
            };

            MinUnityVersion = new VersionInfo( 5 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlTarget.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlTarget.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlTarget.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlTarget.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlTarget.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlTarget.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlTarget.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlTarget.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlTarget.Menu,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlTarget.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlTarget.RightStickButton,
                    Source = Button10
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlTarget.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlTarget.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlTarget.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlTarget.RightStickX,
                    Source = Analog3
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlTarget.RightStickY,
                    Source = Analog4,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlTarget.RightTrigger,
                    Source = Analog5
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlTarget.DPadLeft,
                    Source = Analog6,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlTarget.DPadRight,
                    Source = Analog6,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlTarget.DPadUp,
                    Source = Analog7,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlTarget.DPadDown,
                    Source = Analog7,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                }
            };
        }
        public MogaProLinuxProfile()
        {
            Name = "MOGA Pro";
            Meta = "MOGA Pro on Linux";

            SupportedPlatforms = new[] {
                "Linux",
            };

            JoystickNames = new[] {
                "Moga Pro HID",
            };

            MaxUnityVersion = new VersionInfo(4, 9);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button6
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = Analog0,
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = Analog3,
                    Invert = true
                },
                new InputControlMapping {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog5,
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog4
                }
            };
        }
        public Xbox360LinuxProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Microsoft X-Box 360 pad",
                "Generic X-Box pad",
                "Mega World Thrustmaster dual analog 3.2",
            };

            LastResortRegex = "360";

            MaxUnityVersion = new VersionInfo(4, 9, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button11,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button12,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button13,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button14,
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlType.Menu,
                    Source = Button8
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog3),
                RightStickRightMapping(Analog3),
                RightStickUpMapping(Analog4),
                RightStickDownMapping(Analog4),

                DPadLeftMapping(Analog6),
                DPadRightMapping(Analog6),
                DPadUpMapping(Analog7),
                DPadDownMapping(Analog7),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                }
            };
        }
        public Xbox360LinuxProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Microsoft X-Box 360 pad",
                "Generic X-Box pad"
            };

            LastResortRegex = "360";

            MaxUnityVersion = new VersionInfo(4, 9);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button11,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button12,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button13,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button14,
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlType.Menu,
                    Source = Button8
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = Analog3
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = Analog4,
                    Invert = true
                },
                new InputControlMapping {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                }
            };
        }
        public GameStickLinuxProfile()
        {
            Name = "GameStick Controller";
            Meta = "GameStick Controller on Linux";

            IncludePlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "GameStick Controller"
            };

            MaxUnityVersion = new VersionInfo(4, 9, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button13
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button14
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button11
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog2),
                RightStickRightMapping(Analog2),
                RightStickUpMapping(Analog3),
                RightStickDownMapping(Analog3),

                DPadLeftMapping(Analog6),
                DPadRightMapping(Analog6),
                DPadUpMapping(Analog7),
                DPadDownMapping(Analog7),
            };
        }
        public GenericLinuxProfile()
        {
            Name = "Generic Controller";
            Meta = "Generic Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickRegex = new[] {
                "."
            };

            MinUnityVersion = new VersionInfo(5, 0, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlType.Menu,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button11,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button12,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button13,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button14,
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog3),
                RightStickRightMapping(Analog3),
                RightStickUpMapping(Analog4),
                RightStickDownMapping(Analog4),

                DPadLeftMapping(Analog6),
                DPadRightMapping(Analog6),
                DPadUpMapping(Analog7),
                DPadDownMapping(Analog7),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
            };
        }
Exemple #14
0
        public LogitechF510LinuxProfile()
        {
            Name = "Logitech F510 Controller";
            Meta = "Logitech F510 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Logitech Gamepad F510"
            };

            MaxUnityVersion = new VersionInfo(4, 9);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = Button6
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = Analog3
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = Analog4,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
                new InputControlMapping {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlMapping {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                }
            };
        }
Exemple #15
0
        public SNESProfile( )
        {
            Name = "SNES Controller";
            Meta = "Some junk-ass controller off ebay.";

            SupportedPlatforms = new[] {
                "Windows"
            };

            JoystickRegex = new[] {
                "USB Gamepad",
                "USB Gamepad ",
            };

            MinUnityVersion = new VersionInfo(5, 0, 0, 0);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action4,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action3,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Select",
                    Target = InputControlType.Select,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button9
                },
            };

            AnalogMappings = new[] {
                DPadLeftMapping(Analog0),
                DPadRightMapping(Analog0),
                DPadUpMapping(Analog4),
                DPadDownMapping(Analog4),
            };
        }
        public LogitechF510LinuxProfile()
        {
            Name = "Logitech F510 Controller";
            Meta = "Logitech F510 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Logitech Gamepad F510"
            };

            MaxUnityVersion = new VersionInfo( 4, 9 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = Button6
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping( Analog0 ),
                LeftStickRightMapping( Analog0 ),
                LeftStickUpMapping( Analog1 ),
                LeftStickDownMapping( Analog1 ),

                RightStickLeftMapping( Analog3 ),
                RightStickRightMapping( Analog3 ),
                RightStickUpMapping( Analog4 ),
                RightStickDownMapping( Analog4 ),

                DPadLeftMapping( Analog6 ),
                DPadRightMapping( Analog6 ),
                DPadUpMapping( Analog7 ),
                DPadDownMapping( Analog7 ),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
            };
        }
        public PlayStation3LinuxProfile()
        {
            Name = "PlayStation 3 Controller";
            Meta = "PlayStation 3 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Sony PLAYSTATION(R)3 Controller",
                "SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller"                 // Not a typo.
            };

            MaxUnityVersion = new VersionInfo(4, 9);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = Button14
                },
                new InputControlMapping {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = Button13
                },
                new InputControlMapping {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = Button15
                },
                new InputControlMapping {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = Button12
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button11
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Select",
                    Target = InputControlType.Select,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = Button16
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping(Analog0),
                LeftStickRightMapping(Analog0),
                LeftStickUpMapping(Analog1),
                LeftStickDownMapping(Analog1),

                RightStickLeftMapping(Analog2),
                RightStickRightMapping(Analog2),
                RightStickUpMapping(Analog3),
                RightStickDownMapping(Analog3),
            };
        }
		public MogaProLinuxProfile()
		{
			Name = "Moga Pro";
			Meta = "Moga Pro on Linux";

			SupportedPlatforms = new[] {
				"Linux",
			};

			JoystickNames = new[] {
				"Moga Pro HID",
			};

			MaxUnityVersion = new VersionInfo( 4, 9, 0, 0 );

			ButtonMappings = new[] {
				new InputControlMapping {
					Handle = "A",
					Target = InputControlType.Action1,
					Source = Button0
				},
				new InputControlMapping {
					Handle = "B",
					Target = InputControlType.Action2,
					Source = Button1
				},
				new InputControlMapping {
					Handle = "X",
					Target = InputControlType.Action3,
					Source = Button2
				},
				new InputControlMapping {
					Handle = "Y",
					Target = InputControlType.Action4,
					Source = Button3
				},
				new InputControlMapping {
					Handle = "Left Bumper",
					Target = InputControlType.LeftBumper,
					Source = Button4
				},
				new InputControlMapping {
					Handle = "Right Bumper",
					Target = InputControlType.RightBumper,
					Source = Button5
				},
				new InputControlMapping {
					Handle = "Left Stick Button",
					Target = InputControlType.LeftStickButton,
					Source = Button7
				},
				new InputControlMapping {
					Handle = "Right Stick Button",
					Target = InputControlType.RightStickButton,
					Source = Button8
				},
				new InputControlMapping {
					Handle = "Start",
					Target = InputControlType.Start,
					Source = Button6
				}
			};

			AnalogMappings = new[] {
				LeftStickLeftMapping( Analog0 ),
				LeftStickRightMapping( Analog0 ),
				LeftStickUpMapping( Analog1 ),
				LeftStickDownMapping( Analog1 ),

				RightStickLeftMapping( Analog2 ),
				RightStickRightMapping( Analog2 ),
				RightStickUpMapping( Analog3 ),
				RightStickDownMapping( Analog3 ),

				DPadLeftMapping( Analog6 ),
				DPadRightMapping( Analog6 ),
				DPadUpMapping( Analog7 ),
				DPadDownMapping( Analog7 ),

				new InputControlMapping {
					Handle = "Left Trigger",
					Target = InputControlType.LeftTrigger,
					Source = Analog5,
				},
				new InputControlMapping {
					Handle = "Right Trigger",
					Target = InputControlType.RightTrigger,
					Source = Analog4
				}
			};
		}
        public Xbox360LinuxProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Microsoft X-Box 360 pad",
                "Generic X-Box pad",
                "Mega World Thrustmaster dual analog 3.2",
            };

            LastResortRegex = "360";

            MaxUnityVersion = new VersionInfo( 4, 9 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button11,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button12,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button13,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button14,
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlType.Menu,
                    Source = Button8
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping( Analog0 ),
                LeftStickRightMapping( Analog0 ),
                LeftStickUpMapping( Analog1 ),
                LeftStickDownMapping( Analog1 ),

                RightStickLeftMapping( Analog3 ),
                RightStickRightMapping( Analog3 ),
                RightStickUpMapping( Analog4 ),
                RightStickDownMapping( Analog4 ),

                DPadLeftMapping( Analog6 ),
                DPadRightMapping( Analog6 ),
                DPadUpMapping( Analog7 ),
                DPadDownMapping( Analog7 ),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                }
            };
        }
        public OuyaLinuxProfile()
        {
            Name = "OUYA Controller";
            Meta = "OUYA Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "OUYA Game Controller"
            };

            MaxUnityVersion = new VersionInfo( 4, 9 );

            LowerDeadZone = 0.3f;

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "O",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action2,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "U",
                    Target = InputControlType.Action3,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = MenuKey
                },
                new InputControlMapping {
                    Handle = "TouchPad Tap",
                    Target = InputControlType.TouchPadTap,
                    Source = MouseButton0
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = Button10,
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = Button11,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = Button8,
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = Button9,
                },
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping( Analog0 ),
                LeftStickRightMapping( Analog0 ),
                LeftStickUpMapping( Analog1 ),
                LeftStickDownMapping( Analog1 ),

                RightStickLeftMapping( Analog3 ),
                RightStickRightMapping( Analog3 ),
                RightStickUpMapping( Analog4 ),
                RightStickDownMapping( Analog4 ),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },

                new InputControlMapping {
                    Handle = "TouchPad X Axis",
                    Target = InputControlType.TouchPadXAxis,
                    Source = MouseXAxis,
                    Raw = true
                },
                new InputControlMapping {
                    Handle = "TouchPad Y Axis",
                    Target = InputControlType.TouchPadYAxis,
                    Source = MouseYAxis,
                    Raw = true
                }
            };
        }
        public Xbox360LinuxProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "Microsoft X-Box 360 pad",
                "Generic X-Box pad"
            };

            LastResortRegex = "360";

            MaxUnityVersion = new VersionInfo( 4, 9 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlTarget.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlTarget.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlTarget.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlTarget.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlTarget.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlTarget.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlTarget.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlTarget.RightStickButton,
                    Source = Button10
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlTarget.DPadLeft,
                    Source = Button11,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlTarget.DPadRight,
                    Source = Button12,
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlTarget.DPadUp,
                    Source = Button13,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlTarget.DPadDown,
                    Source = Button14,
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlTarget.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlTarget.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlTarget.Menu,
                    Source = Button8
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlTarget.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlTarget.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlTarget.RightStickX,
                    Source = Analog3
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlTarget.RightStickY,
                    Source = Analog4,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Left",
                    Target = InputControlTarget.DPadLeft,
                    Source = Analog6,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Right",
                    Target = InputControlTarget.DPadRight,
                    Source = Analog6,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle = "DPad Up",
                    Target = InputControlTarget.DPadUp,
                    Source = Analog7,
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "DPad Down",
                    Target = InputControlTarget.DPadDown,
                    Source = Analog7,
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlTarget.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlTarget.RightTrigger,
                    Source = Analog5
                }
            };
        }
		public LogitechF510LinuxProfile()
		{
			Name = "Logitech F510 Controller";
			Meta = "Logitech F510 Controller on Linux";

			SupportedPlatforms = new[] {
				"Linux"
			};

			JoystickNames = new[] {
				"Logitech Gamepad F510"
			};

			MaxUnityVersion = new VersionInfo( 4, 9 );

			ButtonMappings = new[] {
				new InputControlMapping {
					Handle = "A",
					Target = InputControlType.Action1,
					Source = Button0
				},
				new InputControlMapping {
					Handle = "B",
					Target = InputControlType.Action2,
					Source = Button1
				},
				new InputControlMapping {
					Handle = "X",
					Target = InputControlType.Action3,
					Source = Button2
				},
				new InputControlMapping {
					Handle = "Y",
					Target = InputControlType.Action4,
					Source = Button3
				},
				new InputControlMapping {
					Handle = "Left Bumper",
					Target = InputControlType.LeftBumper,
					Source = Button4
				},
				new InputControlMapping {
					Handle = "Right Bumper",
					Target = InputControlType.RightBumper,
					Source = Button5
				},
				new InputControlMapping {
					Handle = "Left Stick Button",
					Target = InputControlType.LeftStickButton,
					Source = Button9
				},
				new InputControlMapping {
					Handle = "Right Stick Button",
					Target = InputControlType.RightStickButton,
					Source = Button10
				},
				new InputControlMapping {
					Handle = "Start",
					Target = InputControlType.Start,
					Source = Button7
				},
				new InputControlMapping {
					Handle = "Back",
					Target = InputControlType.Select,
					Source = Button6
				}
			};

			AnalogMappings = new[] {
				new InputControlMapping {
					Handle = "Left Stick X",
					Target = InputControlType.LeftStickX,
					Source = Analog0
				},
				new InputControlMapping {
					Handle = "Left Stick Y",
					Target = InputControlType.LeftStickY,
					Source = Analog1,
					Invert = true
				},
				new InputControlMapping {
					Handle = "Right Stick X",
					Target = InputControlType.RightStickX,
					Source = Analog3
				},
				new InputControlMapping {
					Handle = "Right Stick Y",
					Target = InputControlType.RightStickY,
					Source = Analog4,
					Invert = true
				},
				new InputControlMapping {
					Handle = "Left Trigger",
					Target = InputControlType.LeftTrigger,
					Source = Analog2
				},
				new InputControlMapping {
					Handle = "Right Trigger",
					Target = InputControlType.RightTrigger,
					Source = Analog5
				},
				new InputControlMapping {
					Handle = "DPad Left",
					Target = InputControlType.DPadLeft,
					Source = Analog6,
					SourceRange = InputControlMapping.Range.Negative,
					TargetRange = InputControlMapping.Range.Negative,
					Invert = true
				},
				new InputControlMapping {
					Handle = "DPad Right",
					Target = InputControlType.DPadRight,
					Source = Analog6,
					SourceRange = InputControlMapping.Range.Positive,
					TargetRange = InputControlMapping.Range.Positive
				},
				new InputControlMapping {
					Handle = "DPad Up",
					Target = InputControlType.DPadUp,
					Source = Analog7,
					SourceRange = InputControlMapping.Range.Negative,
					TargetRange = InputControlMapping.Range.Negative,
					Invert = true
				},
				new InputControlMapping {
					Handle = "DPad Down",
					Target = InputControlType.DPadDown,
					Source = Analog7,
					SourceRange = InputControlMapping.Range.Positive,
					TargetRange = InputControlMapping.Range.Positive
				}
			};
		}
        public GenericLinuxProfile()
        {
            Name = "Generic Controller";
            Meta = "Generic Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickRegex = new[] {
                "."
            };

            MinUnityVersion = new VersionInfo( 5 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button2
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button5
                },
                new InputControlMapping {
                    Handle = "Back",
                    Target = InputControlType.Back,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Menu",
                    Target = InputControlType.Menu,
                    Source = Button8
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button9
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button10
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping( Analog0 ),
                LeftStickRightMapping( Analog0 ),
                LeftStickUpMapping( Analog1 ),
                LeftStickDownMapping( Analog1 ),

                RightStickLeftMapping( Analog3 ),
                RightStickRightMapping( Analog3 ),
                RightStickUpMapping( Analog4 ),
                RightStickDownMapping( Analog4 ),

                DPadLeftMapping( Analog6 ),
                DPadRightMapping( Analog6 ),
                DPadUpMapping( Analog7 ),
                DPadDownMapping( Analog7 ),

                new InputControlMapping {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = Analog5
                },
            };
        }
        public GameStickLinuxProfile()
        {
            Name = "GameStick Controller";
            Meta = "GameStick Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "GameStick Controller"
            };

            MaxUnityVersion = new VersionInfo( 4, 9 );

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = Button13
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = Button14
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = Button11
                }
            };

            AnalogMappings = new[] {
                LeftStickLeftMapping( Analog0 ),
                LeftStickRightMapping( Analog0 ),
                LeftStickUpMapping( Analog1 ),
                LeftStickDownMapping( Analog1 ),

                RightStickLeftMapping( Analog2 ),
                RightStickRightMapping( Analog2 ),
                RightStickUpMapping( Analog3 ),
                RightStickDownMapping( Analog3 ),

                DPadLeftMapping( Analog6 ),
                DPadRightMapping( Analog6 ),
                DPadUpMapping( Analog7 ),
                DPadDownMapping( Analog7 ),
            };
        }
        public GameStickLinuxProfile()
        {
            Name = "GameStick Controller";
            Meta = "GameStick Controller on Linux";

            SupportedPlatforms = new[] {
                "Linux"
            };

            JoystickNames = new[] {
                "GameStick Controller"
            };

            MaxUnityVersion = new VersionInfo(4, 9);

            ButtonMappings = new[] {
                new InputControlMapping {
                    Handle = "A",
                    Target = InputControlTarget.Action1,
                    Source = Button0
                },
                new InputControlMapping {
                    Handle = "B",
                    Target = InputControlTarget.Action2,
                    Source = Button1
                },
                new InputControlMapping {
                    Handle = "X",
                    Target = InputControlTarget.Action3,
                    Source = Button3
                },
                new InputControlMapping {
                    Handle = "Y",
                    Target = InputControlTarget.Action4,
                    Source = Button4
                },
                new InputControlMapping {
                    Handle = "Left Bumper",
                    Target = InputControlTarget.LeftBumper,
                    Source = Button6
                },
                new InputControlMapping {
                    Handle = "Right Bumper",
                    Target = InputControlTarget.RightBumper,
                    Source = Button7
                },
                new InputControlMapping {
                    Handle = "Left Stick Button",
                    Target = InputControlTarget.LeftStickButton,
                    Source = Button13
                },
                new InputControlMapping {
                    Handle = "Right Stick Button",
                    Target = InputControlTarget.RightStickButton,
                    Source = Button14
                },
                new InputControlMapping {
                    Handle = "Start",
                    Target = InputControlTarget.Start,
                    Source = Button11
                }
            };

            AnalogMappings = new[] {
                new InputControlMapping {
                    Handle = "Left Stick X",
                    Target = InputControlTarget.LeftStickX,
                    Source = Analog0
                },
                new InputControlMapping {
                    Handle = "Left Stick Y",
                    Target = InputControlTarget.LeftStickY,
                    Source = Analog1,
                    Invert = true
                },
                new InputControlMapping {
                    Handle = "Right Stick X",
                    Target = InputControlTarget.RightStickX,
                    Source = Analog2
                },
                new InputControlMapping {
                    Handle = "Right Stick Y",
                    Target = InputControlTarget.RightStickY,
                    Source = Analog3,
                    Invert = true
                },
                new InputControlMapping {
                    Handle      = "DPad X",
                    Target      = InputControlTarget.DPadX,
                    Source      = Analog6,
                    SourceRange = InputControlMapping.Range.Complete,
                    TargetRange = InputControlMapping.Range.Complete
                },
                new InputControlMapping {
                    Handle      = "DPad Y",
                    Target      = InputControlTarget.DPadY,
                    Source      = Analog7,
                    SourceRange = InputControlMapping.Range.Complete,
                    TargetRange = InputControlMapping.Range.Complete,
                },
            };
        }