Adding an option to quit mtplot from gui

You used to only be able to quit mtplot from the terminal you started it
from or by sending it a signal with "kill."  Usually this is fine but if
you happen to start it from in a shell on the device (like you got to
your shell through crosh) then it's a pain to have to ssh in, or go to
VT2 and find the pid, etc.

This patch just checks to see if you've pressed "q" while it's checking
other keystrokes and returns out of the main loop if you have.  So now
you can hit 'q' to quit if the graphical window is in focus.

BUG=chromium:222056
TEST=manual, gmerged and ran on a Chromebook

Change-Id: Iebf5bfe93f34949900595ef572c778ff027a81d9
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46518
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
1 file changed