Play a sound on onkeydown (Javascript)

I want to play a keystroke wav/mp3 whenever an onkeydown event is registered, in JavaScript.

What's the approved code?
Who is Participating?
Gurvinder Pal SinghConnect With a Mentor Commented:
try this one (it says that its cross browser one)

just call this method at onkeydown
window.onkeydown = function(){
edhastedAuthor Commented:
Thanks, I'll need to spend some time on these and get to grips with the current prower limitations.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.