Skip to content

Instantly share code, notes, and snippets.

@leMaur
Created January 12, 2023 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leMaur/21901bf6125871443e615d05955bf305 to your computer and use it in GitHub Desktop.
Save leMaur/21901bf6125871443e615d05955bf305 to your computer and use it in GitHub Desktop.
const passwordInput = document.getElementById('password');
passwordInput.addEventListener('keyup', function (event) {
if (event.getModifierState('CapsLock')) {
// CapsLock is open
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment