feat(keymap): allow users to toggle layers
This commit is contained in:
parent
d7dee20e8d
commit
a82f990d4c
7 changed files with 79 additions and 0 deletions
|
|
@ -76,6 +76,11 @@ static struct zmk_behavior_binding zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_
|
|||
WRITE_BIT(zmk_keymap_layer_state, layer, state); \
|
||||
return 0;
|
||||
|
||||
bool zmk_keymap_layer_active(u8_t layer)
|
||||
{
|
||||
return (zmk_keymap_layer_state & (BIT(layer))) == (BIT(layer));
|
||||
};
|
||||
|
||||
int zmk_keymap_layer_activate(u8_t layer)
|
||||
{
|
||||
SET_LAYER_STATE(layer, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue