summaryrefslogtreecommitdiffstats
path: root/charger/charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'charger/charger.c')
-rw-r--r--charger/charger.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/charger/charger.c b/charger/charger.c
index b63312c..aface7e 100644
--- a/charger/charger.c
+++ b/charger/charger.c
@@ -754,6 +754,10 @@ static int set_key_callback(int code, int value, void *data)
if (code > KEY_MAX)
return -1;
+ /* ignore events that don't modify our state */
+ if (charger->keys[code].down == down)
+ return -1;
+
/* only record the down even timestamp, as the amount
* of time the key spent not being pressed is not useful */
if (down)