0
How do I use W.A.S.D. as buttons.
2 Answers
+ 1
document.addEventListener('keydown', (e) => {
console.log(e.keyCode)
})
will log the keyCode of any key you press, from there you can use if statements to do specific actions based on what the key code is. A=65, D=68, S=83, W=87
+ 1
Thanks