0

How do I play when I press the letter D?

Help me! https://code.sololearn.com/WVoAueibKznw/?ref=app

12th Apr 2019, 10:42 PM
Neymar Silva
Neymar Silva - avatar
6 Answers
+ 1
Then you need to know how to retrieve the code of the button and test the pressed key code against the play button code ( each key on your keyboard has a specific code ) search this on the internet than you are good to go
12th Apr 2019, 11:56 PM
bxhd
+ 2
Thank you friend, it helped me a lot, I got it! Thank you!
12th Apr 2019, 11:57 PM
Neymar Silva
Neymar Silva - avatar
+ 1
I think adding an event listener for "keydown" ( the name of the event if im not mistaken ) should do the trick
12th Apr 2019, 11:33 PM
bxhd
+ 1
Well sorry its not keydown its keypress but the u should search how to know the key pressed, in your case thats the letter "d"
12th Apr 2019, 11:47 PM
bxhd
0
No result :(
12th Apr 2019, 11:39 PM
Neymar Silva
Neymar Silva - avatar
0
in case it would be playBtn?
12th Apr 2019, 11:51 PM
Neymar Silva
Neymar Silva - avatar