summaryrefslogtreecommitdiff
path: root/app/boards
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-06-22 11:06:01 -0400
committerPete Johanson <peter@peterjohanson.com>2020-06-22 11:06:01 -0400
commit55cf9db564e66e2804f2d3f2201c55c3c86a90d7 (patch)
tree5b3ae3a9631f8e9271a435ed4b3064b1d43f6b71 /app/boards
parent8027be106eef7671604695a1a0f0e2828839ceb3 (diff)
Fix consumer keys w/ refactored behaviors.
Diffstat (limited to 'app/boards')
-rw-r--r--app/boards/native_posix.overlay4
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/include/keymap.h5
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/keymap.c34
-rw-r--r--app/boards/shields/petejohanson_handwire/keymap/keymap.overlay26
4 files changed, 8 insertions, 61 deletions
diff --git a/app/boards/native_posix.overlay b/app/boards/native_posix.overlay
index bf9ae2c..e9c4c95 100644
--- a/app/boards/native_posix.overlay
+++ b/app/boards/native_posix.overlay
@@ -56,7 +56,7 @@
label = "DEFAULT";
bindings = <
- &kp B &mo A &kp C &kp E
+ &kp B &mo 1 &kp C &kp E
&kp D &kp G &kp F &kp Q>;
};
@@ -64,7 +64,7 @@
label = "LOWER";
bindings = <
- &kp N &trans &kp O &kp Q
+ &cp M_NEXT &trans &kp O &kp Q
&kp L &kp J &kp P &kp K>;
};
diff --git a/app/boards/shields/petejohanson_handwire/keymap/include/keymap.h b/app/boards/shields/petejohanson_handwire/keymap/include/keymap.h
deleted file mode 100644
index 01cd9e5..0000000
--- a/app/boards/shields/petejohanson_handwire/keymap/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
diff --git a/app/boards/shields/petejohanson_handwire/keymap/keymap.c b/app/boards/shields/petejohanson_handwire/keymap/keymap.c
deleted file mode 100644
index 067cd08..0000000
--- a/app/boards/shields/petejohanson_handwire/keymap/keymap.c
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include <zmk/keys.h>
-#include <zmk/keymap.h>
-#include <keymap.h>
-
-bool zmk_handle_key_user(struct zmk_key_event *key_event)
-{
- switch (key_event->key)
- {
- case CC_LOWR:
- if (key_event->pressed)
- {
- zmk_keymap_layer_activate(1);
- }
- else
- {
- zmk_keymap_layer_deactivate(1);
- }
-
- return false;
- case CC_RAIS:
- if (key_event->pressed)
- {
- zmk_keymap_layer_activate(2);
- }
- else
- {
- zmk_keymap_layer_deactivate(2);
- }
- return false;
- }
-
- return true;
-};
diff --git a/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay b/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay
index 5da88b8..b294171 100644
--- a/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay
+++ b/app/boards/shields/petejohanson_handwire/keymap/keymap.overlay
@@ -1,6 +1,5 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
-#include <keymap.h>
/ {
chosen {
@@ -18,37 +17,24 @@
default: layer_0 {
label = "DEFAULT";
- keys =
- <
- KC_A MT(MOD_LSFT, KC_B) ZC_NO ZC_NO
- CC_RAIS CC_LOWR ZC_NO ZC_NO
- >;
bindings = <
- &reset &kp 0
- &kp 1 &kp 2>;
+ &cp M_NEXT &mt MOD_LSFT B &trans &trans
+ &mo 1 &mo 2 &trans &trans>;
};
lower: layer_1 {
label = "LOWER";
- keys = <
- KC_MPLY KC_MNXT ZC_NO ZC_NO
- ZC_TRNS ZC_TRNS ZC_NO ZC_NO
- >;
bindings = <
- &reset &kp 0
- &kp 1 &kp 2>;
+ &cp M_PLAY &cp M_NEXT &trans &trans
+ &trans &trans &trans &trans>;
};
raise: layer_2 {
label = "RAISE";
- keys = <
- KC_C KC_D ZC_NO ZC_NO
- ZC_TRNS ZC_TRNS ZC_NO ZC_NO>;
-
bindings = <
- &reset &kp 0
- &kp 1 &kp 2>;
+ &kp C &kp D &trans &trans
+ &trans &kp E &trans &trans>;
};
};
};