From 3d07ca461430e8d62fc375a5ea1706c3cacc0508 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 1 Feb 2017 22:53:37 +0100 Subject: [PATCH] Fix the key counting Bail out if the key did NOT toggle on, instead of bailing out only if it did. This addresses the key count computation part of #1. (Shifting looks fine, after this change) Signed-off-by: Gergely Nagy --- src/Akela/Heatmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Akela/Heatmap.cpp b/src/Akela/Heatmap.cpp index 20f41727..0feed26b 100644 --- a/src/Akela/Heatmap.cpp +++ b/src/Akela/Heatmap.cpp @@ -85,7 +85,7 @@ namespace Akela { return mappedKey; // if the key is not toggled on, return. - if (key_toggled_on (keyState)) + if (!key_toggled_on (keyState)) return mappedKey; totalKeys++;