diff options
author | Nick Brassel <[email protected]> | 2023-05-15 22:27:37 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-05-15 22:27:37 +1000 |
commit | 5faa23d54ca1e3ab83097f2a07922f48800616e6 (patch) | |
tree | 6ed05e5492f3fc8dda210a75b897dd9d4ed8df38 /quantum/keymap_introspection.h | |
parent | 433dc6068603e61d466e755aedcea0be96664f95 (diff) | |
download | qmk_firmware-5faa23d54ca1e3ab83097f2a07922f48800616e6.tar.gz qmk_firmware-5faa23d54ca1e3ab83097f2a07922f48800616e6.zip |
Keymap introspection for combos. (#19670)
Diffstat (limited to 'quantum/keymap_introspection.h')
-rw-r--r-- | quantum/keymap_introspection.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h index 201de937cb..2012a2b8cc 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -34,3 +34,24 @@ uint16_t keycode_at_encodermap_location_raw(uint8_t layer_num, uint8_t encoder_i uint16_t keycode_at_encodermap_location(uint8_t layer_num, uint8_t encoder_idx, bool clockwise); #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Combos + +#if defined(COMBO_ENABLE) + +// Forward declaration of combo_t so we don't need to deal with header reordering +struct combo_t; +typedef struct combo_t combo_t; + +// Get the number of combos defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t combo_count_raw(void); +// Get the number of combos defined in the user's keymap, potentially stored dynamically +uint16_t combo_count(void); + +// Get the keycode for the encoder mapping location, stored in firmware rather than any other persistent storage +combo_t* combo_get_raw(uint16_t combo_idx); +// Get the keycode for the encoder mapping location, potentially stored dynamically +combo_t* combo_get(uint16_t combo_idx); + +#endif // defined(COMBO_ENABLE) |