aboutsummaryrefslogtreecommitdiff
path: root/quantum/keymap_introspection.h
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2024-07-06 09:57:54 +1000
committerGitHub <[email protected]>2024-07-06 00:57:54 +0100
commit4ae0ca5a11c475ee49bbce13d29edbf9bd6fc636 (patch)
tree3db17c17257f9079a9dbf847041e4af255e89fbf /quantum/keymap_introspection.h
parentb9e67347f1db160a5d1bd718ab0713a407014e43 (diff)
downloadqmk_firmware-4ae0ca5a11c475ee49bbce13d29edbf9bd6fc636.tar.gz
qmk_firmware-4ae0ca5a11c475ee49bbce13d29edbf9bd6fc636.zip
Tap dance introspection (#24049)
Diffstat (limited to 'quantum/keymap_introspection.h')
-rw-r--r--quantum/keymap_introspection.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h
index f7516bf42a..bc4dd93b4c 100644
--- a/quantum/keymap_introspection.h
+++ b/quantum/keymap_introspection.h
@@ -61,9 +61,30 @@ 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
+// Get the combo definition, 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
+// Get the combo definition, potentially stored dynamically
combo_t* combo_get(uint16_t combo_idx);
#endif // defined(COMBO_ENABLE)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Tap Dance
+
+#if defined(TAP_DANCE_ENABLE)
+
+// Forward declaration of tap_dance_action_t so we don't need to deal with header reordering
+struct tap_dance_action_t;
+typedef struct tap_dance_action_t tap_dance_action_t;
+
+// Get the number of tap dances defined in the user's keymap, stored in firmware rather than any other persistent storage
+uint16_t tap_dance_count_raw(void);
+// Get the number of tap dances defined in the user's keymap, potentially stored dynamically
+uint16_t tap_dance_count(void);
+
+// Get the tap dance definitions, stored in firmware rather than any other persistent storage
+tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx);
+// Get the tap dance definitions, potentially stored dynamically
+tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx);
+
+#endif // defined(TAP_DANCE_ENABLE)