Block Esc key default action

Use e.preventDefault() where the Esc keycode is trapped to prevent browsers
from executing their normal handling (usually to stop pending network requests).