Add a device preference, which defaults to automatic (gamepad, then either mouse or keyboard depending if its a button or an axis). Also change the ordering so that multiple mappings for the same device list the first mapping as a preference.