]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Change Command keycode defaults to match corresponding Bootmagic codes (#5078)
authorKonstantin Đorđević <vomindoraan@gmail.com>
Mon, 18 Feb 2019 06:23:32 +0000 (07:23 +0100)
committerDrashna Jaelre <drashna@live.com>
Mon, 18 Feb 2019 06:23:32 +0000 (22:23 -0800)
* 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

docs/feature_command.md
keyboards/xd75/keymaps/billypython/config.h
quantum/template/avr/config.h
tmk_core/common/command.c
tmk_core/common/command.h
users/billypython/config.h
users/konstantin/config.h

index 53a140a11682ea071ff919594488b19c48deac5e..deabedc1c3f6c5afb1b76259c73dbaa83b527880 100644 (file)
@@ -29,9 +29,10 @@ If you would like to change the key assignments for Command, `#define` these in
 |`MAGIC_KEY_CONSOLE`                 |`C`                                                                        |Enable the Command console                      |
 |`MAGIC_KEY_VERSION`                 |`V`                                                                        |Print the running QMK version to the console    |
 |`MAGIC_KEY_STATUS`                  |`S`                                                                        |Print the current keyboard status to the console|
-|`MAGIC_KEY_HELP1`                   |`H`                                                                        |Print Command help to the console               |
-|`MAGIC_KEY_HELP2`                   |`SLASH`                                                                    |Print Command help to the console (alternate)   |
+|`MAGIC_KEY_HELP                   |`H`                                                                        |Print Command help to the console               |
+|`MAGIC_KEY_HELP_ALT`                |`SLASH`                                                                    |Print Command help to the console (alternate)   |
 |`MAGIC_KEY_LAYER0`                  |`0`                                                                        |Make layer 0 the default layer                  |
+|`MAGIC_KEY_LAYER0_ALT`              |`GRAVE`                                                                    |Make layer 0 the default layer (alternate)      |
 |`MAGIC_KEY_LAYER1`                  |`1`                                                                        |Make layer 1 the default layer                  |
 |`MAGIC_KEY_LAYER2`                  |`2`                                                                        |Make layer 2 the default layer                  |
 |`MAGIC_KEY_LAYER3`                  |`3`                                                                        |Make layer 3 the default layer                  |
@@ -41,10 +42,10 @@ If you would like to change the key assignments for Command, `#define` these in
 |`MAGIC_KEY_LAYER7`                  |`7`                                                                        |Make layer 7 the default layer                  |
 |`MAGIC_KEY_LAYER8`                  |`8`                                                                        |Make layer 8 the default layer                  |
 |`MAGIC_KEY_LAYER9`                  |`9`                                                                        |Make layer 9 the default layer                  |
-|`MAGIC_KEY_LAYER0_ALT1`             |`ESC`                                                                      |Make layer 0 the default layer (alternate)      |
-|`MAGIC_KEY_LAYER0_ALT2`             |`GRAVE`                                                                    |Make layer 0 the default layer (alternate)      |
-|`MAGIC_KEY_BOOTLOADER`              |`PAUSE`                                                                    |Enter the bootloader                            |
+|`MAGIC_KEY_BOOTLOADER`              |`B`                                                                        |Jump to bootloader                              |
+|`MAGIC_KEY_BOOTLOADER_ALT`          |`ESC`                                                                      |Jump to bootloader (alternate)                  |
 |`MAGIC_KEY_LOCK`                    |`CAPS`                                                                     |Lock the keyboard so nothing can be typed       |
-|`MAGIC_KEY_EEPROM`                  |`E`                                                                        |Clear the EEPROM                                |
+|`MAGIC_KEY_EEPROM`                  |`E`                                                                        |Print stored EEPROM config to the console       |
+|`MAGIC_KEY_EEPROM_CLEAR`            |`BSPACE`                                                                   |Clear the EEPROM                                |
 |`MAGIC_KEY_NKRO`                    |`N`                                                                        |Toggle N-Key Rollover (NKRO)                    |
 |`MAGIC_KEY_SLEEP_LED`               |`Z`                                                                        |Toggle LED when computer is sleeping            |
index 275f8effba793e3ed365bef0146010d05fa5e523..36e6b6785170d0b4e0581572ac3d8d2b207010e5 100644 (file)
@@ -2,9 +2,6 @@
 
 #define FORCE_NKRO
 
-#define MAGIC_KEY_LAYER0_ALT1  BSLS
-#define MAGIC_KEY_BOOTLOADER   ESC
-
 #define MOUSEKEY_DELAY              50
 #define MOUSEKEY_INTERVAL           15
 #define MOUSEKEY_MAX_SPEED          4
index a31fcf236fbf4c62d45228fdd8601bc60d923e97..41e1aa0788f203c681551a93540547b7d89a1ec9 100644 (file)
@@ -143,8 +143,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
 //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
 //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1          H
-//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_HELP           H
+//#define MAGIC_KEY_HELP_ALT       SLASH
 //#define MAGIC_KEY_DEBUG          D
 //#define MAGIC_KEY_DEBUG_MATRIX   X
 //#define MAGIC_KEY_DEBUG_KBD      K
@@ -152,9 +152,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //#define MAGIC_KEY_VERSION        V
 //#define MAGIC_KEY_STATUS         S
 //#define MAGIC_KEY_CONSOLE        C
-//#define MAGIC_KEY_LAYER0_ALT1    ESC
-//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
 //#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER0_ALT     GRAVE
 //#define MAGIC_KEY_LAYER1         1
 //#define MAGIC_KEY_LAYER2         2
 //#define MAGIC_KEY_LAYER3         3
@@ -164,9 +163,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //#define MAGIC_KEY_LAYER7         7
 //#define MAGIC_KEY_LAYER8         8
 //#define MAGIC_KEY_LAYER9         9
-//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_BOOTLOADER     B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
 //#define MAGIC_KEY_LOCK           CAPS
 //#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_EEPROM_CLEAR   BSPACE
 //#define MAGIC_KEY_NKRO           N
 //#define MAGIC_KEY_SLEEP_LED      Z
 
index aab99290d2121949fcf4f5015eead60990f96cf0..d3884d9fa9725d9e3839be04ff7542ad78f8e824 100644 (file)
@@ -151,17 +151,17 @@ static void command_common_help(void)
                                            "0-9:       Switch to Layer 0-9\n"
 #endif
 
-               STR(MAGIC_KEY_LAYER0_ALT1 ) ":  Switch to Layer 0 (alternate key 1)\n"
-               STR(MAGIC_KEY_LAYER0_ALT2 ) ":  Switch to Layer 0 (alternate key 2)\n"
-               STR(MAGIC_KEY_BOOTLOADER  ) ":  Jump to Bootloader (Reset)\n"
+               STR(MAGIC_KEY_LAYER0_ALT  ) ":  Switch to Layer 0 (alternate)\n"
+
+               STR(MAGIC_KEY_BOOTLOADER    ) ":        Jump to Bootloader\n"
+               STR(MAGIC_KEY_BOOTLOADER_ALT) ":        Jump to Bootloader (alternate)\n"
 
 #ifdef KEYBOARD_LOCK_ENABLE
-               STR(MAGIC_KEY_LOCK        ) ":  Lock\n"
+               STR(MAGIC_KEY_LOCK        ) ":  Lock Keyboard\n"
 #endif
 
-#ifdef BOOTMAGIC_ENABLE
                STR(MAGIC_KEY_EEPROM      ) ":  Print EEPROM Settings\n"
-#endif
+               STR(MAGIC_KEY_EEPROM_CLEAR) ":  Clear EEPROM\n"
 
 #ifdef NKRO_ENABLE
                STR(MAGIC_KEY_NKRO        ) ":  NKRO Toggle\n"
@@ -265,7 +265,6 @@ static void print_status(void)
        return;
 }
 
-#ifdef BOOTMAGIC_ENABLE
 static void print_eeconfig(void)
 {
 
@@ -305,7 +304,6 @@ static void print_eeconfig(void)
 #endif /* !NO_PRINT */
 
 }
-#endif /* BOOTMAGIC_ENABLE */
 
 static bool command_common(uint8_t code)
 {
@@ -326,14 +324,17 @@ static bool command_common(uint8_t code)
             break;
 #endif
 
-#ifdef BOOTMAGIC_ENABLE
-
                // print stored eeprom config
         case MAGIC_KC(MAGIC_KEY_EEPROM):
             print("eeconfig:\n");
             print_eeconfig();
             break;
-#endif
+
+               // clear eeprom
+        case MAGIC_KC(MAGIC_KEY_EEPROM_CLEAR):
+            print("Clearing EEPROM\n");
+           eeconfig_init();
+            break;
 
 #ifdef KEYBOARD_LOCK_ENABLE
 
@@ -352,8 +353,8 @@ static bool command_common(uint8_t code)
 #endif
 
                // print help
-        case MAGIC_KC(MAGIC_KEY_HELP1):
-        case MAGIC_KC(MAGIC_KEY_HELP2):
+        case MAGIC_KC(MAGIC_KEY_HELP):
+        case MAGIC_KC(MAGIC_KEY_HELP_ALT):
             command_common_help();
             break;
 
@@ -370,6 +371,7 @@ static bool command_common(uint8_t code)
 
         // jump to bootloader
         case MAGIC_KC(MAGIC_KEY_BOOTLOADER):
+        case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT):
             clear_keyboard(); // clear to prevent stuck keys
             print("\n\nJumping to bootloader... ");
             #ifdef AUDIO_ENABLE
@@ -453,8 +455,7 @@ static bool command_common(uint8_t code)
 
                // switch layers
 
-               case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1):
-               case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2):
+               case MAGIC_KC(MAGIC_KEY_LAYER0_ALT):
             switch_default_layer(0);
             break;
 
index 052e251843889c84f1ed2ff583180f07b0b14be5..e7c7b0ea1d2296c692b440d849ecc46edffc7fd1 100644 (file)
@@ -50,12 +50,12 @@ bool command_proc(uint8_t code);
 #define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
 #endif
 
-#ifndef MAGIC_KEY_HELP1
-#define MAGIC_KEY_HELP1          H
+#ifndef MAGIC_KEY_HELP
+#define MAGIC_KEY_HELP           H
 #endif
 
-#ifndef MAGIC_KEY_HELP2
-#define MAGIC_KEY_HELP2          SLASH
+#ifndef MAGIC_KEY_HELP_ALT
+#define MAGIC_KEY_HELP_ALT       SLASH
 #endif
 
 #ifndef MAGIC_KEY_DEBUG
@@ -86,18 +86,14 @@ bool command_proc(uint8_t code);
 #define MAGIC_KEY_CONSOLE        C
 #endif
 
-#ifndef MAGIC_KEY_LAYER0_ALT1
-#define MAGIC_KEY_LAYER0_ALT1    ESC
-#endif
-
-#ifndef MAGIC_KEY_LAYER0_ALT2
-#define MAGIC_KEY_LAYER0_ALT2    GRAVE
-#endif
-
 #ifndef MAGIC_KEY_LAYER0
 #define MAGIC_KEY_LAYER0         0
 #endif
 
+#ifndef MAGIC_KEY_LAYER0_ALT
+#define MAGIC_KEY_LAYER0_ALT     GRAVE
+#endif
+
 #ifndef MAGIC_KEY_LAYER1
 #define MAGIC_KEY_LAYER1         1
 #endif
@@ -135,7 +131,11 @@ bool command_proc(uint8_t code);
 #endif
 
 #ifndef MAGIC_KEY_BOOTLOADER
-#define MAGIC_KEY_BOOTLOADER     PAUSE
+#define MAGIC_KEY_BOOTLOADER     B
+#endif
+
+#ifndef MAGIC_KEY_BOOTLOADER_ALT
+#define MAGIC_KEY_BOOTLOADER_ALT ESC
 #endif
 
 #ifndef MAGIC_KEY_LOCK
@@ -146,6 +146,10 @@ bool command_proc(uint8_t code);
 #define MAGIC_KEY_EEPROM         E
 #endif
 
+#ifndef MAGIC_KEY_EEPROM_CLEAR
+#define MAGIC_KEY_EEPROM_CLEAR   BSPACE
+#endif
+
 #ifndef MAGIC_KEY_NKRO
 #define MAGIC_KEY_NKRO           N
 #endif
@@ -155,5 +159,5 @@ bool command_proc(uint8_t code);
 
 #endif
 
-#define XMAGIC_KC(key) KC_##key
-#define MAGIC_KC(key) XMAGIC_KC(key)
+#define XMAGIC_KC(key)  KC_ ## key
+#define MAGIC_KC(key)   XMAGIC_KC(key)
index 705e6c934a0de94c4881e74b9d4932adc36556fc..4609adbbeafd2ed310d9ea9eaf233b025808941f 100644 (file)
@@ -2,8 +2,6 @@
 
 #define FORCE_NKRO
 
-#define MAGIC_KEY_BOOTLOADER B
-
 #define MOUSEKEY_DELAY              50
 #define MOUSEKEY_INTERVAL           15
 #define MOUSEKEY_MAX_SPEED          4
index 800b8e49ba0e735bb2913e67294c3a912222499a..f18c4a70e455d51eebe61aa1037d70a9729b1721 100644 (file)
@@ -2,9 +2,6 @@
 
 #define FORCE_NKRO
 
-#define MAGIC_KEY_LAYER0_ALT1 BSLS
-#define MAGIC_KEY_BOOTLOADER  ESC
-
 #define MOUSEKEY_DELAY             50
 #define MOUSEKEY_INTERVAL          15
 #define MOUSEKEY_MAX_SPEED         4