From 9472ba1d39e85b11c28d16b793fac1150ba153e5 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Wed, 20 Jan 2016 18:12:47 -0600 Subject: gui: Actions: Toggle backlight on power key Create GUIAction to handle KEY_POWER with a screen backlight toggle. Change-Id: Iad0a7923b4a776e0336722db74d6fc46cd0107a2 --- gui/gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gui/gui.cpp') diff --git a/gui/gui.cpp b/gui/gui.cpp index 17ed108fc..3f1312f46 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -205,7 +205,9 @@ bool InputHandler::processInput(int timeout_ms) break; } - blankTimer.resetTimerAndUnblank(); + if (ev.code != KEY_POWER && ev.code > KEY_RESERVED) + blankTimer.resetTimerAndUnblank(); + return true; // we got an event, so there might be more in the queue } -- cgit v1.2.3