QMK firmware fun
Just some notes because I do this infrequently enough that I keep forgetting what to do.
The JSON keymap from QMK Configurator can be converted to keymap.c using the below command in QMK console. Just remember that you might have custom code left from your previous compile, so don't overwrite it!
qmk json2c filename.json > keymap.c
Edit the .c file and remember to check config.h and rules.mk. These are all in:
Then run qmk compile, and move the resulting .hex file into the Arduino folder:
copy "C:\Users\Swift\qmk_firmware\handwired_dactyl_manuform_5x6_mrmisterswift.hex" "C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\dactyl-custom-20210522.hex"
Now comes the run part. If you're too lazy to solder the reset buttons, and can't access the RESET key, you'll need to close the RST pin (3rd from the top on the right side, if you're holding the micro USB pointing up) to one of the GND pins (3 or 4 on the left side). Do this with Device Manager open, so you can see which COM port it shows up as. Then, prep the following .bat file:
mode com5: BAUD=1200 parity=N data=8 stop=1 avrdude -C ..\etc\avrdude.conf -v -p atmega32u4 -c avr109 -P com5 -b 57600 -D -U flash:w:dactyl-custom-20210522.hex
Get the commandline ready with the prompt ready to go, then tap the pins together again with jumper cable, and press Enter on the other keyboard you have plugged in.
As for the actual config itself, some peculiarities:
Layer Tap-Toggle, i.e. TT(n), must have KC_TRANS on the target layer. If you are on the origin layer, it will toggle the destination layer to on. The origin layer is still enabled, but any key on the target layer that is not KC_TRANS overrides it. To go back, instead of dedicating a key to TO(0), just double tap the TT() key on your origin layer to return permenantly, or hold it to temporarily have the destination layer disabled and your access to the origin layer restored.
ACTION_TAP_DANCE_DOUBLE doesn't seem to work with TO(n) (maybe I used MO by mistake?), use ACTION_TAP_DANCE_LAYER_MOVE instead. For functions, use ACTION_TAP_DANCE_FN, because _DOUBLE won't pick up your custom keycode.
Macros for Alt+0183 style functions need to use the numpad numbers, not the number row ones. Which means:
// SEND_STRING(SS_LCTL("0183")); register_code(KC_LALT); tap_code(KC_P0); tap_code(KC_P1); tap_code(KC_P8); tap_code(KC_P3); unregister_code(KC_LALT);
Lastly, LT(layer, kc) only activates the layer momentarily when held. Use the tap dance above for a permanent switch.