Hi there @algernon finally looped back around to this.
Using stock Kaleidoscope, i’ve tried to patch my firmware to enable the Keymap Programmer plugin, here is the diff:
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino
index f30171d..2e074a8 100644
--- a/Model01-Firmware.ino
+++ b/Model01-Firmware.ino
@@ -19,6 +19,7 @@
// Support for storing the keymap in EEPROM
#include "Kaleidoscope-EEPROM-Settings.h"
#include "Kaleidoscope-EEPROM-Keymap.h"
+#include "Kaleidoscope-EEPROM-Keymap-Programmer.h"
// Support for communicating with the host via a simple Serial protocol
#include "Kaleidoscope-FocusSerial.h"
@@ -89,7 +90,8 @@
*/
enum { MACRO_VERSION_INFO,
- MACRO_ANY
+ MACRO_ANY,
+ MACRO_KEYMAP_REPROGRAM
};
@@ -174,7 +176,7 @@ KEYMAPS(
#if defined (PRIMARY_KEYMAP_QWERTY)
[PRIMARY] = KEYMAP_STACKED
- (___, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
+ (M(MACRO_KEYMAP_REPROGRAM), Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G,
Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape,
@@ -336,6 +338,12 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
case MACRO_ANY:
anyKeyMacro(keyState);
break;
+ case MACRO_KEYMAP_REPROGRAM:
+ if (keyToggledOff(keyState)) {
+ EEPROMKeymapProgrammer.mode = kaleidoscope::plugin::EEPROMKeymapProgrammer::COPY;
+ EEPROMKeymapProgrammer.activate();
+ }
+ break;
}
return MACRO_NONE;
}
@@ -434,6 +442,7 @@ KALEIDOSCOPE_INIT_PLUGINS(
// The EEPROMSettings & EEPROMKeymap plugins make it possible to have an
// editable keymap in EEPROM.
EEPROMSettings,
+ EEPROMKeymapProgrammer,
EEPROMKeymap,
// Focus allows bi-directional communication with the host, and is the
@@ -529,6 +538,8 @@ void setup() {
// First, call Kaleidoscope's internal setup function
Kaleidoscope.setup();
+ Layer.getKey = EEPROMKeymap.getKey;
+
// While we hope to improve this in the future, the NumPad plugin
// needs to be explicitly told which keymap layer is your numpad layer
NumPad.numPadLayer = NUMPAD;
Once flashed, when I press the prog key, the next 2 key presses are ate (as expected for COPY mode), however after that the copy/switch does not appear to work.
I’m not sure how to go about debugging this. Any tips?