diff options
author | Cody McGinnis <brainwart@gmail.com> | 2020-08-18 14:02:25 -0400 |
---|---|---|
committer | Cody McGinnis <brainwart@gmail.com> | 2020-08-18 14:02:25 -0400 |
commit | 7facb6eee8c5864c86b0a69213db4aabf6f24585 (patch) | |
tree | 570af422991b513ff48b9ed78bbbfdf7c1d8f241 /app/src/behaviors | |
parent | ae104374c0af0c2cbf9d246f980ccce56e60c105 (diff) |
fix(keymap): move the toggle layer logic to keymap.c
Diffstat (limited to 'app/src/behaviors')
-rw-r--r-- | app/src/behaviors/behavior_toggle_layer.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c index ff0fe6a..13f4a29 100644 --- a/app/src/behaviors/behavior_toggle_layer.c +++ b/app/src/behaviors/behavior_toggle_layer.c @@ -25,12 +25,7 @@ static int behavior_tog_init(struct device *dev) static int tog_keymap_binding_pressed(struct device *dev, u32_t position, u32_t layer, u32_t _) { - LOG_DBG("position %d layer %d current %d", position, layer, zmk_keymap_layer_active(layer)); - - if (zmk_keymap_layer_active(layer)) - return zmk_keymap_layer_deactivate(layer); - - return zmk_keymap_layer_activate(layer); + return zmk_keymap_layer_toggle(layer); } static int tog_keymap_binding_released(struct device *dev, u32_t position, u32_t layer, u32_t _) |