Initial work on keymap transforms for non-standard matrixes.

* Allows "gaps" for keyboards like Kyra.
* Allows keyboards with matrixes that don't map the logical key
  locations to have normal looking keymaps when defined.
This commit is contained in:
Pete Johanson
2020-06-15 17:03:34 -04:00
parent 0712dadd29
commit 1751470785
12 changed files with 1028 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#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;
};