Is there a keyCode for the Windows key or a way to detect when it is pressed with Javascript or jQuery?
I've dug through StackOverflow and have found how to detect command for Mac and Ctrl and Alt for Mac and Windows, but can't find any solutions for detecting when the user presses Windows Key. Not sure if it's just a metaKey like command is but represented by the Windows Flag, or if it's even detectable at all.
I ran the following js and got 91 when pressing windows key.
document.onkeydown = function(evt){
console.log(evt.keyCode);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With