From 8abaa3bc2df4fda13a96d0c5c4ce74b70c974fb7 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 16 Jul 2024 09:22:17 +1000 Subject: Add support for key override introspection. (#24120) --- 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 bc4dd93b4c..719825c674 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -88,3 +88,24 @@ tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx); tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx); #endif // defined(TAP_DANCE_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Key Overrides + +#if defined(KEY_OVERRIDE_ENABLE) + +// Forward declaration of key_override_t so we don't need to deal with header reordering +struct key_override_t; +typedef struct key_override_t key_override_t; + +// Get the number of key overrides defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t key_override_count_raw(void); +// Get the number of key overrides defined in the user's keymap, potentially stored dynamically +uint16_t key_override_count(void); + +// Get the key override definitions, stored in firmware rather than any other persistent storage +const key_override_t* key_override_get_raw(uint16_t key_override_idx); +// Get the key override definitions, potentially stored dynamically +const key_override_t* key_override_get(uint16_t key_override_idx); + +#endif // defined(KEY_OVERRIDE_ENABLE) -- cgit v1.2.3