Mig, I don't know if this is applicable to MMF2 or higher, but in MMF1.5 I used the, I believe it was called, Direct Input object.
I cannot say 100% whether what I am about to describe is exactly how I did this but I think it works or should at least give you the idea you need to do this.
I must mention for clarify that each object in MMF1.5 had "Alterable Variables" labeled A - Z.
Make sense? Let us begin.
In order to get keyboard AND controller, we need to use a 3 object system. The plugin object "Direct Keyboard", "Direct Controller", and a custom object which I would call "Button States".
Setup for Direct Keyboard and Direct Controller:
I use the Alterable Variables for these objects to hold my custom control configuration. I name my Alterable Variables based on the action they represent like; Up, Down, Left, Right, Jump, Attack, Sub Weapon, etc. I do this for both of them, and it is the same order of names. Inside Direct Keyboard I store the NUMBER of the keyboard key inside the Alterable Variable that is suppose to be for that action, used to check if it has been pressed or not. Inside Direct Control I store the NUMBER of the controller button inside the Alterable Variable that is suppose to be for that action. Changing these Alterable Variables can change the assigned key or button.
NOTE: I believe that D-Pad and Analog Stick controls may be different, but they do NOT need ot change so their influence can be programmed without needing it to change. You still will need to allow Keyboard users to re-map their movement keys however.
What is "Button States"? This is not actually 'the buttons on a controller' but rather a register to calculate button presses form the keyboard and the controller. I name my Alterable Variables based on the action they represent like; Up, Down, left, Right, Jump, Attack, Sub Weapon, etc. Let us use the "Jump" Alterable Variable. When it is 0 the button is not pressed. When it is 1, it has just been pressed in that frame. When it is higher than 1, it has been held down.
So here is how this would work. Here I will describe the events necessary for this to function. I will use the JUMP action to illustrate. Hopefully this is understandable. (I realize this is not proper MMF syntax but I forgot the format. Hopefully you get the idea.)
Events:
If [DirectKeyboard] Key is Down "DirectKeyboard.Jump"
OR
If [DirectControl] Key is Down "DirectControl.Jump"
Actions:
Add 1 to "ButtonStates.Jump"
and
Events:
If [DirectKeyboard] Key is NOT Down "DirectKeyboard.Jump"
AND
If [DirectControl] Key is NOT Down "DirectControl.Jump"
Actions:
Set "ButtonStates.Jump" to 0
Do this for EVERY action you need represented by a button. So in this example do it for: Up, Down, left, Right, Jump, Attack, and Sub Weapon
The code above is designed to check both Keyboard and Controller buttons in the same event, and only add 1 ONCE to the button state. This prevents 2 being added to the button state if both are pressed at the same time.
The code above is designed to not set the button state to 0 unless both keyboard and controller assignments are BOTH released.
Now how do you read these buttons?
When ButtonStates.Jump is 0, it is not being pressed. When ButtonStates.Jump is 1, it has just been pressed. When ButtonStates.Jump is greater than OR equal to 1, it is being held down.
You would only start a jump action on the player if the button state for Jump was 1. Not if it is greater than 1. This prevents the player from jumping endlessly when you hold down the button.
Because it continues to add to the number, you can read how many frames the button has been held down too.
When you let go of the button it will return to 0, so you know it is not being pressed.
Event:
If ButtonStates.Jump equal to 1
Actions:
Belmont jumps.
Event:
If ButtonStates.Attack is greater than or equal to 1
Belmont whip attack is finished.
Actions:
Belmont starts whip brandish.
Hopefully you understand the concept I am trying to explain. It is not as complicated as I likely make it seem here. MMF2 may also have a better way to do this, or this may not work in MMF2 as it is. Im sure you can figure out a way to make it work. You are very talented Mig.