Improvements to tag JS: cancellation + catching non-printing keypresses