• Wednesday , 5 August 2020

Detecting CAPS LOCK on HTML forms – JavaScript Tutorial

Code Canyon

In this video I’ll take you through how to easily detect if CAPS LOCK is enabled with JavaScript – it’s super easy to do with KeyboardEvent.getModifierState().

The example used in this video involves an HTML form and basically we’ll be adding a simple message that warns the user that CAPS LOCK is in fact on.

Support me on Patreon:
https://www.patreon.com/dcode – with enough funding I plan to develop a website of some sort with a new developer experience!

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!

Original source

3d Ocean

Related Posts


  1. Srini R
    January 24, 2019 at 02:08

    onload will not work. How to do in simple way ?

  2. Doğukan Çavuş
    January 24, 2019 at 02:08

    what is your visual code theme?

  3. CK 002
    January 24, 2019 at 02:08


  4. SOL
    January 24, 2019 at 02:08


Leave A Comment

You must be logged in to post a comment.