What happens if you use both, but in opposite directions?
You could try separating this process into steps. Define an input "vector" (really a number from -1 to 1). Initialize the vector every step to 0. If keyboard left down, subtract 1 from the vector. If D-pad left down, subtract 1. If keyboard right, add. If D-pad right, add. Then normalize the vector (set to -1 if less than -1, 1 if greater than 1).
Handle animation and movement next, based on the value of your input vector.