From 86938fd958836e86cced081f46e8901bad245df8 Mon Sep 17 00:00:00 2001 From: jpe230 Date: Sat, 8 Oct 2022 11:13:58 -0500 Subject: [PATCH] Allow QK_MAKE to work with converters (#18637) --- builddefs/converters.mk | 1 + quantum/quantum.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/builddefs/converters.mk b/builddefs/converters.mk index b3e7bec0077..c7e499226c2 100644 --- a/builddefs/converters.mk +++ b/builddefs/converters.mk @@ -29,6 +29,7 @@ ifneq ($(CONVERT_TO),) # Configure any defaults OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')) + OPT_DEFS += -DCONVERTER_TARGET=\"$(strip $(CONVERT_TO))\" OPT_DEFS += -DCONVERTER_ENABLED VPATH += $(CONVERTER) diff --git a/quantum/quantum.c b/quantum/quantum.c index 5b5364c8f11..0f94e3855de 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -422,7 +422,11 @@ bool process_record_quantum(keyrecord_t *record) { } else { SEND_STRING_DELAY(" compile ", TAP_CODE_DELAY); } +# if defined(CONVERTER_ENABLED) + SEND_STRING_DELAY("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP " -e CONVERT_TO=" CONVERTER_TARGET SS_TAP(X_ENTER), TAP_CODE_DELAY); +# else SEND_STRING_DELAY("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP SS_TAP(X_ENTER), TAP_CODE_DELAY); +# endif if (temp_mod & MOD_MASK_SHIFT && temp_mod & MOD_MASK_CTRL) { reset_keyboard(); }