Just get the input the same way you get the 1st player, only this time reference the 2nd entity pointer rather than the 1st player.

eg> Note : Psuedo

if(key_a || key_b) { c_move(player1,somevector, somevector,somemode);}
if(key_y || key_z) { c_move(player2,somevector, somevector,somemode);}

a and b control player 1, y and z control player 2