From 982864504f4b853b9994621e7c1709338c12801f Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:58:25 +0000 Subject: [PATCH] feat(keymap): Explicit error if zmk,keymap not set --- app/src/keymap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/keymap.c b/app/src/keymap.c index 75a2dcbe64b..94bd12048cf 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -31,6 +31,12 @@ static uint8_t _zmk_keymap_layer_default = 0; #define DT_DRV_COMPAT zmk_keymap +#if !DT_NODE_EXISTS(DT_DRV_INST(0)) + +#error "Keymap node not found, check a keymap is available and is has compatible = "zmk,keymap" set" + +#endif + #define TRANSFORMED_LAYER(node) \ { LISTIFY(DT_PROP_LEN(node, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), node) }