In my code:
window.addEventListener("keydown",doKeyDown);
function doKeyDown(e)
{
console.log(e.keyCode);
var str = String.fromCharCode(e.keyCode);
console.log(str+":"+e.keyCode);
var tune = new Audio();
switch(str)
{
case 'Q':
tune = new Audio("Assets/Tune/C.mp3");
tune.play();
break;
}
}
I want to make the input SHIFT+B so the audio can be played.
I have tried case 'SHIFT+B':
but it doesn't work. Is there a way to fix this?