How do i stop the input of other directional keys?

it has improved the character movement if im already holding down a key, now i need to find a way to fix the skipping if i press two keys at the same time