Can someone make a code that only can go forward while pressing W

Big newbie here, I just need a code that can move forward while pressing W, plsssssss

https://www.youtube.com/watch?v=A-IQYBIkZIA

you should be more specific when you ask questions. for example is it for 2D or 3D project what programming language and more.

Thx :slight_smile: