Moving a character

Hi there, I’m just wondering how to move a character with a third person view and controlling the camera with the mouse. That is when I press right arrow (–>) key,the character should move right from its current facing direction and the current facing direction must be controlled by the mouse.
The character should not always move towards a direction when pressing a movement key.

I have explained my idea in the image I have attached to this question.

Well, if the first key is pressed, then you should set the rotation to what it should be depending on the key pressed.

if(Input.GetKeyDown(KeyCode.D)) {
     transform.rotation = 90;
     //Move forward etc