Initial commit with input-oriented solution (dirty, uncleaned).
Added function onTypingStart which will enclose logic of making an initial snapshot when typing.
Moved strokesRecorded variable initialization.
Fixed issues with arrow keys, simplified code.
Navigation checked extracted to isNavigationKey fn. Added support for keys like home, end etc.
Removed unused vars.
Moved undoManager.newType() call to keydown event.
Changed mouse listener to click event.
Renamed variable to inputFired.
Code adjusted to work with IE.
Simplified code by reusing keyCode variable.
Further cleanup.
Added snapshot.html and minor codestyle fix.
Introduced undoManager.lastKeydownImage property, when key group will change it will use this image to create a snapshot.
Extracted redundant code.
Functional keys handling for IE. Turned out we need to keep hasUndo changes in onTypingStart.
Pointing devices will no longer cause extra snapshot on click.
Changed listener adding function.
Joined keydown listeners, added comments.
Removed old type method.