Created
January 19, 2015 09:03
-
-
Save alfredbez/9bc03c775a3d994e0038 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$('body').keypress(function(e) { | |
var s = String.fromCharCode( e.which ); | |
if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) { | |
console.log('caps is on'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment