aboutsummaryrefslogtreecommitdiff
path: root/waffle/combos.h
diff options
context:
space:
mode:
Diffstat (limited to 'waffle/combos.h')
-rw-r--r--waffle/combos.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/waffle/combos.h b/waffle/combos.h
index f823d4c..9fbfdef 100644
--- a/waffle/combos.h
+++ b/waffle/combos.h
@@ -2,20 +2,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define CMB(name, action, ...) C_##name,
+#define CMB(name, action, ...) name,
enum combos {
#include "combos.def"
- COMBO_LENGTH
};
#undef CMB
-uint16_t COMBO_LEN = COMBO_LENGTH;
-#define CMB(name, action, ...) const uint16_t PROGMEM name##_combo[] = {__VA_ARGS__, COMBO_END};
+#define CMB(name, action, ...) uint16_t const name##_combo[] PROGMEM = {__VA_ARGS__, COMBO_END};
#include "combos.def"
#undef CMB
-combo_t key_combos[COMBO_LENGTH] = {
-#define CMB(name, action, ...) COMBO(name##_combo, action),
+#define CMB(name, action, ...) [name] = COMBO(name##_combo, action),
+combo_t key_combos[] = {
#include "combos.def"
-#undef CMB
};
+#undef CMB