Pete Johanson
4 years ago
3 changed files with 6 additions and 49 deletions
@ -1,9 +0,0 @@
@@ -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) |
@ -1,34 +0,0 @@
@@ -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; |
||||
}; |
Loading…
Reference in new issue