diff options
author | Konstantin Đorđević <vomindoraan@gmail.com> | 2019-02-18 07:23:32 +0100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-02-17 22:23:32 -0800 |
commit | 5cb713148dbc319167517df370ca9dd774ceb31c (patch) | |
tree | ad6b4cfc283b135cb93bb1f539dc8a0fade65a54 /tmk_core/common/command.c | |
parent | 4e2369693f7f2ef654db35d158af5cddb98d9703 (diff) | |
download | qmk_firmware-5cb713148dbc319167517df370ca9dd774ceb31c.tar.gz qmk_firmware-5cb713148dbc319167517df370ca9dd774ceb31c.zip |
Change Command keycode defaults to match corresponding Bootmagic codes (#5078)
* Change Command keycode defaults to match corresponding Bootmagic codes
* Make alternate magic key keycodes consistent
* Reflect changes from previous commit in tmk_core/common/command.c
* Remove unnecessary MAGIC_KEY_* definitions from keymaps compatible with these changes
* Swap E and BSPACE for MAGIC_KEY_EEPROM
* Add MAGIC_KEY_EEPROM_CLEAR instead of MAGIC_KEY_EEPROM_ALT
* Remove BOOTMAGIC_ENABLE checks around EECONFIG stuff
* Update Command descriptions
Diffstat (limited to 'tmk_core/common/command.c')
-rw-r--r-- | tmk_core/common/command.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index aab99290d..d3884d9fa 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c | |||
@@ -151,17 +151,17 @@ static void command_common_help(void) | |||
151 | "0-9: Switch to Layer 0-9\n" | 151 | "0-9: Switch to Layer 0-9\n" |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | STR(MAGIC_KEY_LAYER0_ALT1 ) ": Switch to Layer 0 (alternate key 1)\n" | 154 | STR(MAGIC_KEY_LAYER0_ALT ) ": Switch to Layer 0 (alternate)\n" |
155 | STR(MAGIC_KEY_LAYER0_ALT2 ) ": Switch to Layer 0 (alternate key 2)\n" | 155 | |
156 | STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader (Reset)\n" | 156 | STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader\n" |
157 | STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" | ||
157 | 158 | ||
158 | #ifdef KEYBOARD_LOCK_ENABLE | 159 | #ifdef KEYBOARD_LOCK_ENABLE |
159 | STR(MAGIC_KEY_LOCK ) ": Lock\n" | 160 | STR(MAGIC_KEY_LOCK ) ": Lock Keyboard\n" |
160 | #endif | 161 | #endif |
161 | 162 | ||
162 | #ifdef BOOTMAGIC_ENABLE | ||
163 | STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" | 163 | STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" |
164 | #endif | 164 | STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" |
165 | 165 | ||
166 | #ifdef NKRO_ENABLE | 166 | #ifdef NKRO_ENABLE |
167 | STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" | 167 | STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" |
@@ -265,7 +265,6 @@ static void print_status(void) | |||
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | 267 | ||
268 | #ifdef BOOTMAGIC_ENABLE | ||
269 | static void print_eeconfig(void) | 268 | static void print_eeconfig(void) |
270 | { | 269 | { |
271 | 270 | ||
@@ -305,7 +304,6 @@ static void print_eeconfig(void) | |||
305 | #endif /* !NO_PRINT */ | 304 | #endif /* !NO_PRINT */ |
306 | 305 | ||
307 | } | 306 | } |
308 | #endif /* BOOTMAGIC_ENABLE */ | ||
309 | 307 | ||
310 | static bool command_common(uint8_t code) | 308 | static bool command_common(uint8_t code) |
311 | { | 309 | { |
@@ -326,14 +324,17 @@ static bool command_common(uint8_t code) | |||
326 | break; | 324 | break; |
327 | #endif | 325 | #endif |
328 | 326 | ||
329 | #ifdef BOOTMAGIC_ENABLE | ||
330 | |||
331 | // print stored eeprom config | 327 | // print stored eeprom config |
332 | case MAGIC_KC(MAGIC_KEY_EEPROM): | 328 | case MAGIC_KC(MAGIC_KEY_EEPROM): |
333 | print("eeconfig:\n"); | 329 | print("eeconfig:\n"); |
334 | print_eeconfig(); | 330 | print_eeconfig(); |
335 | break; | 331 | break; |
336 | #endif | 332 | |
333 | // clear eeprom | ||
334 | case MAGIC_KC(MAGIC_KEY_EEPROM_CLEAR): | ||
335 | print("Clearing EEPROM\n"); | ||
336 | eeconfig_init(); | ||
337 | break; | ||
337 | 338 | ||
338 | #ifdef KEYBOARD_LOCK_ENABLE | 339 | #ifdef KEYBOARD_LOCK_ENABLE |
339 | 340 | ||
@@ -352,8 +353,8 @@ static bool command_common(uint8_t code) | |||
352 | #endif | 353 | #endif |
353 | 354 | ||
354 | // print help | 355 | // print help |
355 | case MAGIC_KC(MAGIC_KEY_HELP1): | 356 | case MAGIC_KC(MAGIC_KEY_HELP): |
356 | case MAGIC_KC(MAGIC_KEY_HELP2): | 357 | case MAGIC_KC(MAGIC_KEY_HELP_ALT): |
357 | command_common_help(); | 358 | command_common_help(); |
358 | break; | 359 | break; |
359 | 360 | ||
@@ -370,6 +371,7 @@ static bool command_common(uint8_t code) | |||
370 | 371 | ||
371 | // jump to bootloader | 372 | // jump to bootloader |
372 | case MAGIC_KC(MAGIC_KEY_BOOTLOADER): | 373 | case MAGIC_KC(MAGIC_KEY_BOOTLOADER): |
374 | case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT): | ||
373 | clear_keyboard(); // clear to prevent stuck keys | 375 | clear_keyboard(); // clear to prevent stuck keys |
374 | print("\n\nJumping to bootloader... "); | 376 | print("\n\nJumping to bootloader... "); |
375 | #ifdef AUDIO_ENABLE | 377 | #ifdef AUDIO_ENABLE |
@@ -453,8 +455,7 @@ static bool command_common(uint8_t code) | |||
453 | 455 | ||
454 | // switch layers | 456 | // switch layers |
455 | 457 | ||
456 | case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1): | 458 | case MAGIC_KC(MAGIC_KEY_LAYER0_ALT): |
457 | case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2): | ||
458 | switch_default_layer(0); | 459 | switch_default_layer(0); |
459 | break; | 460 | break; |
460 | 461 | ||