Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to detect if caps lock is on/off

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 361
    Comment on it

    Hello Reader's, If want to make alert when the upper/lower case letter key is pressed. Then by using Javascript you can see it in the code below:-

    $('#cap').keypress(function(e) { 
        var s = String.fromCharCode( e.which );
        if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) {
            alert('caps key is on');
        }
    });
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: