Thanks so much, that sounds very plausible! I wasn't able to reset it before though, I am using QMK toolbox in windows to flash. How did you manage to undo the swap with a reset and reflash? I will program these commands on a layer somewhere so I can unswap if it happens again.
Flashing the new hex file unswapped everything somehow, but I programmed keys in a third layer to unswap keys if needed in the future. Hope it works, this is my layout (with the code in properties): http://www.keyboard-layout-editor.com/#/gists/f415c3cafd81d2191c2daa5536aa7e6d
Sounds like you got it resolved, but I'll try to answer your question and elaborate a little bit more.
First, I had to reset the eeprom using the instructions here:
https://github.com/qmk/qmk_firmware/tree/master/quantum/tools
That is, erase and overwrite with the "eeprom_reset" hex file provided in that folder of the repository. After that, I flashed my own JC65 keymap again and the swapped keys were back to normal. Note that I did all of this from a linux terminal so I don't know how/if these translate to Windows.
Having those keys to unswap in the future is the best solution I can think of. Since all the bootmagic keys were activated together in my case, it might be possible to program a macro that toggles all the bootmagic options with a single button. It could be easier than undoing them all individually.
This happened to me again tonight for no apparent reason. I tried to program a macro to disable all of the swaps at once, but couldn't get it to work. I was able to make a macro that
activates all the swaps, but the same method wouldn't toggle or turn them off again.
Another solution that disables all of the toggles is to use another bootmagic feature to clear the eeprom. I enabled bootmagic [put "BOOTMAGIC_ENABLE=yes" in rules.mk] and flashed my keymap again. Now, when I hold space + backspace while plugging the board in, it clears the eeprom. All the bootmagic features are disabled at once and there's no need to re-flash after that.
Here's what I had going for the macro in case anyone else wants to take a stab at it. Changing all the false flags to true allows me to reproduce the issue, at least.
More
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
case UNMAGIC:
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
/* keymap config */
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = true;
keymap_config.swap_control_capslock = false;
keymap_config.capslock_to_control = false;
keymap_config.swap_lalt_lgui = false;
keymap_config.swap_ralt_rgui = false;
keymap_config.no_gui = false;
keymap_config.swap_grave_esc = false;
keymap_config.swap_backslash_backspace = false;
keymap_config.swap_lalt_lgui = false;
keymap_config.swap_ralt_rgui = false;
eeconfig_update_keymap(keymap_config.raw);
clear_keyboard(); // clear to prevent stuck keys
break;
...