Prevent 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).

Not preventing the default was causing the client to disconnect and reconnect
when using the Esc key to mark messages as read.