summaryrefslogtreecommitdiff
path: root/common/keyboard.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-01-15 00:06:52 +0900
committertmk <nobody@nowhere>2013-01-15 00:55:16 +0900
commitf609712da3b94ea36612a6f210bd6ce902b74631 (patch)
tree8fe37ac58b1fabf1d960cfe091c118b06ff2f00e /common/keyboard.h
parent32633a42c74c65462370ef4a39a44a5784a98a06 (diff)
Fix waiting_keys and periodical update for delaying layer.
Diffstat (limited to 'common/keyboard.h')
-rw-r--r--common/keyboard.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/keyboard.h b/common/keyboard.h
index 1166536617..cf85b12336 100644
--- a/common/keyboard.h
+++ b/common/keyboard.h
@@ -37,7 +37,14 @@ typedef struct {
uint16_t time;
} keyevent_t;
-#define KEYEQ(keya, keyb) (keya.row == keyb.row && keya.col == keyb.col)
+#define KEYEQ(keya, keyb) (keya.row == keyb.row && keya.col == keyb.col)
+#define IS_NOEVENT(event) (event.time == 0)
+#define NOEVENT (keyevent_t) { \
+ .key = (keypos_t){ .row = 255, .col = 255 }, \
+ .pressed = false, \
+ .time = 0, \
+}
+
extern uint8_t current_layer;
extern uint8_t default_layer;