What's the problem? My motor works properly only when we press the left key and not others
The reason your code only works for left, is because when v is LOW your else block gets executed and sets all pins to low! You need to use else if.

if(condition1)
{
  ...
}
else if (condition2)
{
  ...
}
else
{
  ...
}