uint8_t prevDecisionTime;
} __attribute__((packed)) KeyState;
+// Ghost Element, after ghost detection/cancelation
+typedef struct KeyGhost {
+ KeyPosition prev;
+ KeyPosition cur;
+ KeyPosition saved; // state before ghosting
+} __attribute__((packed)) KeyGhost;
+
+// utility
+inline uint8_t keyOn(/*KeyPosition*/uint8_t st)
+{ return (st == KeyState_Press || st == KeyState_Hold) ? 1 : 0; }
// ----- Functions -----