Help with character control with UI buttons

Im working on a mobile game for android and i want the character to be controlled with buttons. Is there a way i can make it so when the button is pressed on phone it acts like a key on the keyboard is pressed. I have the UI with buttons set up already. For example i want it so when i press the up arrow UI button it acts like im pressing W on my keyboard.

Hi mate =) It is pretty simple, could you check this link pls =)