I have been thinking about this issue for a while now and my recent efforts to find an already existing answer have not been successful.
I am trying to implement a menu system via which the player can map custom keys to each of the controls in the game (of which there are not a whole lot of). What i currently have is a functional menu where the user is able to specify which key they want each control bound to. This screen then writes these keys to a simple XML file from which the rest of the game is able to access these key bounds.
My problem is this: The user is able to use both the mouse and the keyboard to bind the controls to, however these are separate types according to XNA. When i go to retrieve the keybinding that has been loaded from the file i dont know which type it is, as it could be either. Is there some way of dealing with multiple types in this case or am i going to have to create my own type which encompasses both types within it?
At this point I am open to any ideas, Thanks in advance.