Implementation of DOM 3 Keyboard Events
Current version conflicted with the latest w3c spec. New version will coming as soon as I get free time
Beta 3
document.addEventListener("keydown", function(e){ console.log(e.type, e.key, e.char, e.shiftKey) })
document.dispatchEvent(new KeyboardEvent("keydown", { key: "1", char: "!", shiftKey: true }))
- Normalize Keyroard Events across modern browsers
- Implement "map event.key to character values of a normal QUERTY (en-US) layout" proposal
- Implement KeyboardEvent constructor
- more readme
- tests
- examples
- fixing more Opera 12- keyboard event bugs
- IE9
- Opera 12
- Safari 5.1
- Chrome 18
- FireFox 11
- Theoretically polyfill would work in any browser with
addEventListener
support - You can bring IE6-8 support with DOM and ES5 shim (need tests)
MIT