Pete Johanson
4 years ago
20 changed files with 197 additions and 242 deletions
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
|
||||
#include <dt-bindings/zmk/keys.h> |
||||
|
||||
#define CC_RAIS ZC_CSTM(1) |
||||
#define CC_LOWR ZC_CSTM(2) |
@ -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(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; |
||||
}; |
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
#pragma once |
||||
|
||||
bool zmk_keymap_layer_activate(u8_t layer); |
||||
bool zmk_keymap_layer_deactivate(u8_t layer); |
||||
int zmk_keymap_layer_activate(u8_t layer); |
||||
int zmk_keymap_layer_deactivate(u8_t layer); |
||||
|
||||
int zmk_keymap_position_state_changed(u32_t position, bool pressed); |
||||
|
Loading…
Reference in new issue