From 5faa23d54ca1e3ab83097f2a07922f48800616e6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 15 May 2023 22:27:37 +1000 Subject: Keymap introspection for combos. (#19670) --- quantum/keymap_introspection.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'quantum/keymap_introspection.h') 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) -- cgit v1.2.3