How do I move the character diagonally?

I can only left, right, up, down

Can you show your codes?