Last active
July 13, 2016 23:16
-
-
Save Xanir/d42994ba5c564f86d9831a409a4b6272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isCommandKey = function (keycode) { | |
if (keycode < 47) { | |
// Most Command Keys | |
return true; | |
} else if (keycode === 91 || keycode === 92 || keycode === 93) { | |
// Windows keys | |
return true; | |
} else if (keycode === 144 || keycode === 145) { | |
// Scroll Lock / Num Lock | |
return true; | |
} else if (keycode >= 112 && keycode <= 123) { | |
// F keys | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment