Its near impossible to hit the w and up arrow in the same frame. You should add a timer in the input script and set it to something like 0.2 seconds (or 12 frames) after you press w and during that check for up-arrow.
I have not used update , I have used fixed update. Might be I have to make it based on timer. thanks for reply.