Take a screenshot with a keystroke

Take a screenshot with the key 's'. The screenshot image is saved
in the specified directory if '-o' option is used. The intermediate
directories will be created automatically. If no directory is
specified, the default directory '/tmp' is used to save the
screenshot image file.

BUG=chromium:211799
TEST=Start mtplot on a chromebook. Perform the following two tests:

Test 1: Press 's' and check the file "/tmp/mtplot_xxxx.png",
where xxxx is the system current time.
$ mtplot -d :0

Test 2: Press 's' and check the file "/tmp/a/b/c/mtplot_xxxx.png".
$ mtplot -d :0 -o /tmp/a/b/c

CQ-DEPEND=I08d5a88726ec38589538aec0e4e90bfd7a293238
Change-Id: I973fa58aed85fd87ca0df6ea5217ef9bce91559d
Reviewed-on: https://gerrit.chromium.org/gerrit/32206
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
1 file changed