Reputation: 12184
I have tried following code,
window.onkeypress = function(event){
if(event.altKey && (event.keyCode == 99 || event.keyCode == 67)){
alert("alt + C pressed")
}
}
How ever It doesn't work!
I tried alert(event.keyCode) per keypress and it seems when I press opt/alt key on Mac, I get a different keycode other than 99 or 67 with the combination.
Whats the correct way to achieve this ?
Upvotes: 2
Views: 3878