A jQuery plugin to check whether caps lock is turned on.
JavaScript
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
capsChecker.jquery.json
demo.html
jquery.capsChecker.js
jquery.capsChecker.min.js

README.md

jquery.capsChecker

jquery.capsChecker is a jQuery plugin to check whether caps lock is turned on. It is the only plugin of its kind, which can recognize caps lock on numbers. That's important for users with standard German keyboard layout.

Usage

Quickstart:

$('#txtTest').capsChecker({
	capson: function(e, isOn) {
		// ...
	},
	capsoff: function(e, isOn) {
		// ...
	}
});

Both options are optional and false by default.

Manual binding of handlers

$('#txtTest').capsChecker();

$('#txtTest').on('capson', function(e, isOn) {
	//...
});

$('#txtTest').on('capsoff', function(e, isOn) {
	//...
});

Removing a capsChecker from the input field

$('#txtTest').capsChecker('destroy');