X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fbootmagic.c;h=46fbc180a468a372b1b11614cb90240a094aca12;hb=de8ef18a534163b40e307418b3af603142d5d6b0;hp=31b8ae5e6207a3bc0d0e9b97a6d8303ad2f44fe7;hpb=4d64fd8faa8b1a0ceb9019446ba6915aaf1812ea;p=tmk_firmware.git diff --git a/common/bootmagic.c b/common/bootmagic.c index 31b8ae5..46fbc18 100644 --- a/common/bootmagic.c +++ b/common/bootmagic.c @@ -27,6 +27,28 @@ void bootmagic(void) if (bootmagic_scan_keycode(BOOTMAGIC_EEPROM_CLEAR_KEY)) { eeconfig_init(); } + + if (bootmagic_scan_keycode(BOOTMAGIC_SWAP_CONTROL_CPASLOCK)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_SWAP_CONTROL_CAPSLOCK); + } + if (bootmagic_scan_keycode(BOOTMAGIC_CAPSLOCK_TO_CONTROL)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_CAPSLOCK_TO_CONTROL); + } + if (bootmagic_scan_keycode(BOOTMAGIC_SWAP_LALT_LGUI)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_SWAP_LALT_LGUI); + } + if (bootmagic_scan_keycode(BOOTMAGIC_SWAP_RALT_RGUI)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_SWAP_RALT_RGUI); + } + if (bootmagic_scan_keycode(BOOTMAGIC_NO_GUI)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_NO_GUI); + } + if (bootmagic_scan_keycode(BOOTMAGIC_SWAP_GRAVE_ESC)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_SWAP_GRAVE_ESC); + } + if (bootmagic_scan_keycode(BOOTMAGIC_SWAP_BACKSLASH_BACKSPACE)) { + eeconfig_write_keyconf(eeconfig_read_keyconf() ^ EECONFIG_KEYCONF_SWAP_BACKSLASH_BACKSPACE); + } } bool bootmagic_scan_keycode(uint8_t keycode)