Browse Source

Remove unneeded custom keymap code.

xmkb
Pete Johanson 4 years ago
parent
commit
037db585c1
  1. 9
      app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h
  2. 34
      app/boards/shields/petejohanson_proton_handwire/keymap/keymap.c
  3. 12
      app/boards/shields/petejohanson_proton_handwire/keymap/keymap.overlay

9
app/boards/shields/petejohanson_proton_handwire/keymap/include/keymap.h

@ -1,9 +0,0 @@
#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)

34
app/boards/shields/petejohanson_proton_handwire/keymap/keymap.c

@ -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(LOWER);
}
else
{
zmk_keymap_layer_deactivate(LOWER);
}
return false;
case CC_RAIS:
if (key_event->pressed)
{
zmk_keymap_layer_activate(RAISE);
}
else
{
zmk_keymap_layer_deactivate(RAISE);
}
return false;
}
return true;
};

12
app/boards/shields/petejohanson_proton_handwire/keymap/keymap.overlay

@ -19,24 +19,24 @@
label = "DEFAULT"; label = "DEFAULT";
bindings = < bindings = <
&reset &kp A &to 1 &kp A
&kp B &kp C>; &to 2 &kp C>;
}; };
lower: layer_1 { lower: layer_1 {
label = "LOWER"; label = "LOWER";
bindings = < bindings = <
&reset &kp D &trans &kp D
&kp F &kp E>; &trans &kp E>;
}; };
raise: layer_2 { raise: layer_2 {
label = "RAISE"; label = "RAISE";
bindings = < bindings = <
&reset &kp I &trans &kp I
&kp G &kp H>; &trans &kp H>;
}; };
}; };
}; };

Loading…
Cancel
Save