Controller and Keyboard splitscreen

I am making a split screen game where one player plays with the keyboard and the other plays with the controller, I move them with the axises in the input manager but i cant separate the two inputs, for example both of the characters move with the keyboard and with the controller even though they have different axises and different movement codes. How can I fix this?