This is a very small "CapsLock" library is provided in the src/capsLockCore.js file. It is meant to provide detection of when the Caps Lock key is on in a web browser setting by watching keypress and keyup/keydown DOM events and reading the "keyCode" or "charCode" of the keypresses.
See the test code examples for usage patterns.
Documentation Incomplete at Present
I also include tests in 5 formats:
- A simple HTML and JS file for manual testing - see the
test/manual
directory. - A test case for the Google's JsTestDriver unit test framework and test runner. See the
test/jsTestDriver
directory. - A BDD style test using Jasmine - see the
test/jasmine
directory. - Selenium WebDriver tests - In progress and not yet included
- HtmlUnit tests - In progress and not yet included
I wanted to learn out a number of JavaScript / HTML testing frameworks and this was a nice clean small project to do that with.