You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
490 B
35 lines
490 B
4 years ago
|
|
||
|
#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)
|
||
|
{
|
||
4 years ago
|
zmk_keymap_layer_activate(LOWER);
|
||
4 years ago
|
}
|
||
|
else
|
||
|
{
|
||
4 years ago
|
zmk_keymap_layer_deactivate(LOWER);
|
||
4 years ago
|
}
|
||
|
|
||
|
return false;
|
||
|
case CC_RAIS:
|
||
|
if (key_event->pressed)
|
||
|
{
|
||
4 years ago
|
zmk_keymap_layer_activate(RAISE);
|
||
4 years ago
|
}
|
||
|
else
|
||
|
{
|
||
4 years ago
|
zmk_keymap_layer_deactivate(RAISE);
|
||
4 years ago
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
};
|