ui: Allow dismissing debug output with Esc, fix detachable issues

The new debug output using the HWID font looks pretty, but it does bring
a few new UX issues since it often completely overlays the main firmware
screen. This patch adds the ability to force redrawing the screen (i.e.
dismissing any debug text that might be on there) by pressing Esc (which
is probably the most natural thing a user would press to try to get rid
of the text). This check for Esc happens after any other key checks, so
pressing it at the TO_DEV screen will still return you to the recovery
screen (as it has before).

I also noticed some problems when dismissing debug info by selecting a
different menu option in the detachable UI: we don't normally redraw the
whole screen when switching between options, so this will still leave
the debug output in the background (which is usable but ugly). With this
patch the detachable UI will always redraw the screen on the first draw
request after displaying debug info.

TEST=Manually went through affected transitions on Kevin (both clamshell
and detachable).

Change-Id: Ifadbc1a258bb7a7f8029e0f1f1786230aa724ae5
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1548301
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
2 files changed