Skip to content

Commit

Permalink
Discover whether zmk_keymap_layer_activate is patched
Browse files Browse the repository at this point in the history
`zmk_keymap_layer_activate` expects two arguments when patched with:
zmkfirmware@2a64e8a

Adding a preprocessor macro allows *modules* to detect whether the patch is
applied, so that one can invoke the function with the correct number of
arguments.
  • Loading branch information
urob committed Aug 1, 2024
1 parent f1f6323 commit 1d07bd8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/include/zmk/keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ bool zmk_keymap_layer_active(uint8_t layer);
bool zmk_keymap_layer_momentary(uint8_t layer);
bool zmk_keymap_layers_any_momentary(zmk_keymap_layers_state_t layers_mask);
uint8_t zmk_keymap_highest_layer_active(void);
#define ZMK_TRACK_MOMENTARY_LAYER_PATCH
int zmk_keymap_layer_activate(uint8_t layer, bool momentary);
int zmk_keymap_layer_deactivate(uint8_t layer);
int zmk_keymap_layer_toggle(uint8_t layer);
Expand Down

0 comments on commit 1d07bd8

Please sign in to comment.