2020-05-18 23:11:46 +10:00
|
|
|
|
|
|
|
#include <zmk/keys.h>
|
2020-05-19 03:42:41 +10:00
|
|
|
#include <zmk/keymap.h>
|
|
|
|
#include <keymap.h>
|
2020-05-18 23:11:46 +10:00
|
|
|
|
|
|
|
bool zmk_handle_key_user(struct zmk_key_event *key_event)
|
|
|
|
{
|
2020-05-19 03:42:41 +10:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-05-18 23:11:46 +10:00
|
|
|
return true;
|
|
|
|
};
|