How to use the keyboard for P1 and a gamepad for P2?

All you have to do is in the Input settings create different key bindings for each player. For example you could bind W and S to P1_MoveForward and bind gamepad right stick up and gamepad right stick down to P2_MoveForward. Then in your code you could have the Player1 actor use P1_MoveForward to move forward and Player2 actor to use P2_MoveForward to move forward.