It's just a new condition in onkeydown:
else if (e.keyCode === 27) {
deselect();
}
While we're at it, make Shift+z redo. else if (e.keyCode === 90) {
//"z"
if (e.shiftKey) {
changes.redo();
}
else {
changes.undo();
changes.record(1);
}
}
And let's not clutter up the user's history. Swapping window.location.hash=currenthash;
...
window.location.hash=hash;
with window.location.replace(currenthash);
...
window.location.replace(hash);
fixes that one.It's the little things in life, man…