summaryrefslogtreecommitdiff
path: root/app/boards
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-06-13 16:37:31 -0400
committerPete Johanson <peter@peterjohanson.com>2020-06-14 23:58:43 -0400
commit583839afce4b8117e3ae7bd644954b03d0ed3ddf (patch)
treeb6faa1680d16c6702c981603442bf12e15b4e139 /app/boards
parent500232bb83f5eee6815b140f6ca546fef2172f3b (diff)
Initial refactor to have a shield/board have one default keymap.
* Start of work of focusing on out-of-tree user keymaps. Add ZMK_CONFIG support. * General external configuration supported via ZMK_CONFIG, which should point to a configuration directory. * Priority order of overlay files to select. * ${SHIELD}_${BOARD}.overlay * ${SHIELD}.overlay * ${BOARD}.overlay * default.overlay * Equivalent search order for .conf files for initial Kconfig values.
Diffstat (limited to 'app/boards')
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/include/keymap.h (renamed from app/boards/shields/petejohanson_handwire/keymaps/default/include/keymap.h)0
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/keymap.c (renamed from app/boards/shields/petejohanson_handwire/keymaps/default/keymap.c)0
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/keymap.overlay (renamed from app/boards/shields/petejohanson_handwire/keymaps/default/keymap.overlay)0
-rw-r--r--app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h9
-rw-r--r--app/boards/shields/petejohanson_proton_handwire/keymap/keymap.c (renamed from app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.c)8
-rw-r--r--app/boards/shields/petejohanson_proton_handwire/keymap/keymap.overlay (renamed from app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.overlay)0
-rw-r--r--app/boards/shields/petejohanson_proton_handwire/keymaps/default/include/keymap.h5
7 files changed, 13 insertions, 9 deletions
diff --git a/app/boards/shields/petejohanson_handwire/keymaps/default/include/keymap.h b/app/boards/shields/petejohanson_handwire/keymap/include/keymap.h
index 01cd9e5..01cd9e5 100644
--- a/app/boards/shields/petejohanson_handwire/keymaps/default/include/keymap.h
+++ b/app/boards/shields/petejohanson_handwire/keymap/include/keymap.h
diff --git a/app/boards/shields/petejohanson_handwire/keymaps/default/keymap.c b/app/boards/shields/petejohanson_handwire/keymap/keymap.c
index 067cd08..067cd08 100644
--- a/app/boards/shields/petejohanson_handwire/keymaps/default/keymap.c
+++ b/app/boards/shields/petejohanson_handwire/keymap/keymap.c
diff --git a/app/boards/shields/petejohanson_handwire/keymaps/default/keymap.overlay b/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay
index d87363f..d87363f 100644
--- a/app/boards/shields/petejohanson_handwire/keymaps/default/keymap.overlay
+++ b/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay
diff --git a/app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h b/app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h
new file mode 100644
index 0000000..0fd2f9f
--- /dev/null
+++ b/app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h
@@ -0,0 +1,9 @@
+
+#include <dt-bindings/zmk/keys.h>
+
+#define DEFAULT 0
+#define RAISE 1
+#define LOWER 2
+
+#define CC_RAIS ZC_CSTM(RAISE)
+#define CC_LOWR ZC_CSTM(LOWER)
diff --git a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.c b/app/boards/shields/petejohanson_proton_handwire/keymap/keymap.c
index 067cd08..bde15ac 100644
--- a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.c
+++ b/app/boards/shields/petejohanson_proton_handwire/keymap/keymap.c
@@ -10,22 +10,22 @@ bool zmk_handle_key_user(struct zmk_key_event *key_event)
case CC_LOWR:
if (key_event->pressed)
{
- zmk_keymap_layer_activate(1);
+ zmk_keymap_layer_activate(LOWER);
}
else
{
- zmk_keymap_layer_deactivate(1);
+ zmk_keymap_layer_deactivate(LOWER);
}
return false;
case CC_RAIS:
if (key_event->pressed)
{
- zmk_keymap_layer_activate(2);
+ zmk_keymap_layer_activate(RAISE);
}
else
{
- zmk_keymap_layer_deactivate(2);
+ zmk_keymap_layer_deactivate(RAISE);
}
return false;
}
diff --git a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.overlay b/app/boards/shields/petejohanson_proton_handwire/keymap/keymap.overlay
index c1bd542..c1bd542 100644
--- a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/keymap.overlay
+++ b/app/boards/shields/petejohanson_proton_handwire/keymap/keymap.overlay
diff --git a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/include/keymap.h b/app/boards/shields/petejohanson_proton_handwire/keymaps/default/include/keymap.h
deleted file mode 100644
index 01cd9e5..0000000
--- a/app/boards/shields/petejohanson_proton_handwire/keymaps/default/include/keymap.h
+++ /dev/null
@@ -1,5 +0,0 @@
-
-#include <dt-bindings/zmk/keys.h>
-
-#define CC_RAIS ZC_CSTM(1)
-#define CC_LOWR ZC_CSTM(2) \ No newline at end of file