aboutsummaryrefslogtreecommitdiff
path: root/jack/introspection.c
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-06-28 17:34:47 -0600
committerJack Sangdahl <[email protected]>2025-06-28 17:34:47 -0600
commit2ce46c6004c655e9959f5d9326e07f32d70527bc (patch)
treefd1b6fbb4d0660afd66ba1ef814beb8f013e5f3f /jack/introspection.c
parent118f17bae7ad40b79548a3a33a90adfcaba12175 (diff)
downloadqmk_me-master.tar.gz
qmk_me-master.zip
Move introspection code to dedicated fileHEADmaster
Add _keymap callbacks Better guarding for various feature-specific code Improve makefile logic Small readme fixes Remove keyboards from shell script
Diffstat (limited to 'jack/introspection.c')
-rw-r--r--jack/introspection.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/jack/introspection.c b/jack/introspection.c
new file mode 100644
index 0000000..86f453b
--- /dev/null
+++ b/jack/introspection.c
@@ -0,0 +1,33 @@
+// Copyright 2025 [email protected]
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "jack.h"
+
+#ifdef TAP_DANCE_ENABLE
+tap_dance_action_t tap_dance_actions[] = {
+ [EM_DASH_MINS] = ACTION_TAP_DANCE_FN(em_dash_mins),
+ [PLY_NXT_PRV] = ACTION_TAP_DANCE_FN(ply_nxt_prv),
+ [PASTE_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, raise_paste, td_reset),
+ [CBRACKET] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR),
+ [SBRACKET] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
+};
+#endif
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_BASE] = {{KC_VOLU, KC_VOLD}, {KC_MNXT, KC_MPRV}},
+ [_LOWER] = {{XRGB_SAI, XRGB_SAD}, {XRGB_HUI, XRGB_HUD}},
+ [_RAISE] = {{C(KC_LEFT), C(KC_RGHT)}, {C(S(KC_TAB)), C(KC_TAB)}}};
+#endif
+
+#ifdef COMBO_ENABLE
+#define CMB(name, action, ...) \
+ uint16_t const name##_combo[] PROGMEM = {__VA_ARGS__, COMBO_END};
+#include "combos.def"
+#undef CMB
+
+#define CMB(name, action, ...) [name] = COMBO(name##_combo, action),
+combo_t key_combos[] = {
+#include "combos.def"
+};
+#undef CMB
+#endif